|
-
Aug 2nd, 2012, 09:19 AM
#1
Thread Starter
New Member
Passing tag from Office2010 ribbon
Hi,
I'm trying to assign a macro to a customised ribbon. I can do this ok, but I can't get it to pass a tag parameter at all.
My ribbon xml contains:
<mso:button idQ="x1:Letter_0_E3B85FB" label="Letter" imageMso="FileNew" onAction="Letter_2010" tag="letter" visible="true" />
and the macros is defined as:
Sub letter_2010(control As IRibbonControl)
MsgBox control.Tag
End Sub
However, when I click the button, I get an 'Argument not optional' error. If I make the sub definition ...(Optional control as IRibbonControl) and set a breakpoint on the MsgBox line, hovering over the 'control' object yields "control = Nothing".
I guess that the ribbon isn't passing the tag option, and I need to enable it somewhere. As much as I've searched I can't find the answer though!
Any help much appreciated!
Thanks,
Iain
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|