Hello
Does anyone know how to write a function name with arguments in the OnAction
of a command
bar button:
Example: Public Sub MyFunction(strM sg as String)
Msgbox strMsg
End Sub
Now if I write ( MyFunction "This is the message" ) in the OnAction of a
command bar button I get
this error :
can't run the macro or callback function 'MyFunction
"This is the message"'
If a function doesn't have any arguments, simply writing the function name
in the OnAction works well but when
arguments are involved I can't call the function from a command bar button.
Am I using the wrong brackets of quotation marks or something ?
Thanks
G.Gerard
Does anyone know how to write a function name with arguments in the OnAction
of a command
bar button:
Example: Public Sub MyFunction(strM sg as String)
Msgbox strMsg
End Sub
Now if I write ( MyFunction "This is the message" ) in the OnAction of a
command bar button I get
this error :
can't run the macro or callback function 'MyFunction
"This is the message"'
If a function doesn't have any arguments, simply writing the function name
in the OnAction works well but when
arguments are involved I can't call the function from a command bar button.
Am I using the wrong brackets of quotation marks or something ?
Thanks
G.Gerard
Comment