02-17-2011, 10:41 PM
(This post was last modified: 02-17-2011, 10:42 PM by jsknight1969.)
OK. Maybe you are just getting caught in the when to use parenthesis or not issue. If you are assigning a variable with a function return you need them. If you are just calling a function or sub and not returning a value...you don't need them.
Hope this helps.
Code:
Function func1 ()
'Call function 2 and pass value and get the return
returnval = func2("Call func2 and return value")
msgbox returnval
'Call function or sub without a return value
func3 "Call func3"
End Function
Function func2(strd)
'do something here and return value
func2 = "func2: " & strd
End function
Function func3(strf)
'do something but no return value
msgbox "func3: " & strf
End Function
Hope this helps.