i am trying to pass a variable to a function in VBA but i cant get it to work.
this is an example of what i'm trying to do:
private sub myButton_Click()
myString="this is a test"
call myMessage
end sub
function myMessage()
msgbox myString
end function
what am i doing wrong?
this is an example of what i'm trying to do:
private sub myButton_Click()
myString="this is a test"
call myMessage
end sub
function myMessage()
msgbox myString
end function
what am i doing wrong?