the xml code below is what i've got td to replace the ribbon with custom ribbon
(the ribbon xml is in a system table named UsysRibbons and ribbon is chosen via the current database\properties ribbon cbo)
the button works fine - it just calls a macro that opens a table
my trouble is with the combobox
see http://blogs.msdn.com/frice/archive/2006/05/24/606436.aspx
it does show on my ribbon with the 3 items but how to I pass the value of an item to the macro or vba function
td i have tried calling the macro as below onChange="getmessage"
the macro runs using runcode, but i don't know how to reference the ribbons cbo.value in an arguement so can only get single value (no argument)
have tried calling my function directly eg onChange = "myfunc" but get error
can anyone help with correct method(s) please
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<tabs> <tab idMso="TabHomeAccess" visible="false"/>
<tab id="dbCustomTab" label="t1" visible="true">
<group id="g1" label="g1">
<button id="anything" label="addressbook" size ="large" onAction="addresses" />
<comboBox id="mycbo" label="tables" onChange="getmessage">
<item id="item_1" label="item 1" />
<item id="item_2" label="item 2" />
<item id="item_3" label="item 3" />
</comboBox>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
(the ribbon xml is in a system table named UsysRibbons and ribbon is chosen via the current database\properties ribbon cbo)
the button works fine - it just calls a macro that opens a table
my trouble is with the combobox
see http://blogs.msdn.com/frice/archive/2006/05/24/606436.aspx
it does show on my ribbon with the 3 items but how to I pass the value of an item to the macro or vba function
td i have tried calling the macro as below onChange="getmessage"
the macro runs using runcode, but i don't know how to reference the ribbons cbo.value in an arguement so can only get single value (no argument)
have tried calling my function directly eg onChange = "myfunc" but get error
can anyone help with correct method(s) please
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<tabs> <tab idMso="TabHomeAccess" visible="false"/>
<tab id="dbCustomTab" label="t1" visible="true">
<group id="g1" label="g1">
<button id="anything" label="addressbook" size ="large" onAction="addresses" />
<comboBox id="mycbo" label="tables" onChange="getmessage">
<item id="item_1" label="item 1" />
<item id="item_2" label="item 2" />
<item id="item_3" label="item 3" />
</comboBox>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Last edited: