
March 21st, 2005, 09:49 AM
|
|
Registered User
|
|
Join Date: Mar 2005
Posts: 5
Time spent in forums: 1 h 24 m 30 sec
Reputation Power: 0
|
|
|
VBA: Custom function without parameter giving Expected = error
I have two functions, one with a parameter and one without
eg:
Code:
Public Sub FuncWParam(state as boolean)
'some code here
End Sub
Public Sub FuncWOParam()
'some code here
End Sub
Now I can call the function with a parameter like this:
but if i try calling the function that does not have a parameter i get an error
error is:
Expected: =
so i tried giving the function a return value into a variable but then i get the error
Expected: Function or Variable
any ideas?
PS. Another idea I had was, can i use a variables value in a statement? ie somthing similar to:
Code:
Public Sub ClearObject(obj as string)
Me.obj.Value = Null
End Sub
thanks very much for any replies
|