Do you receive the same error if you remove the MsgBox line?
Try this too:
Sub RunSub( control As IRibbonControl )
MsgBox control.Tag
End Sub
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I have written a function to the necessary STRING to generate id, buttons and labels for a dynamicMenu.
However, what is the same for each button is the onAction="RunSub". But how to i pass something unique into the RunSub call back function?
The CustomUI support says to use a tag:
<button id="button" label="Button" tag="123456" onAction="RunSub" />
How do i pass the string "123456" into RunSub. Right now i have this:
Sub RunSub(control As IRibbonControl, tag As String)
MsgBox tag
End Sub
I am expecting an MsgBox to appear with 123456 on it. Instead this produces an Argument not Optional error.
How can i fix this?
Regards,
Douglas
Do you receive the same error if you remove the MsgBox line?
Try this too:
Sub RunSub( control As IRibbonControl )
MsgBox control.Tag
End Sub