qn on standard modules...
Can someone explain to me how exactly to use a standard module (.bas)? I have encountered some problems recently where i tried to create some modules in my application.
The algo works fine when everything is under the form code editor. But when I created the modules, I encountered a compiled error when i call the function from the main form.
The error states:- Expected variable or procedure, not module
When i remove the Call, the error becomes:- Expected: =
I don't encounter this problem when i am passing in 1 value and it happens only when i try to pass in more than 1 value into a sub or function. :confused:
The Call from the main:
Private Sub Option1_Click()
intOpTempNum = 1
Call LUTSelector(intOpTempNum, strLUTName)
End Sub
My module:
Public Function LUTSelector(ByVal intTempOpTempNum As Integer, ByVal strTempLUTName As String)
Select Case intTempOpTempNum
Case 1
Select Case strTempLUTName
.....
Actually i think i need a sub rather than a function because i dun need it to return any value. This program selects the LUT according to the options checked, and it is done by using Select-Case method.
Other qn:
Why do we sometimes use ByVal and sometimes not when we are passing avlues from the main to a function or sub?
When can we use the Call method? When we are calling for function?

