UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Excel Ribbon, Office 2007    
 
   
williams9969
post Mar 23 2012, 04:58 AM
Post #1

UtterAccess Ruler
Posts: 1,888
From: US Army / Iraq



Greetings all

I am using the custom UI editor.

I see several examples on how to call a custom macro...seems easy enough.

I, however, have custom functions within my workbook that i would like to "call" using the ribbon.

Is this possible?

Thank you in advance

Dan
Go to the top of the page
 
+
DanielPineault
post Mar 24 2012, 08:12 AM
Post #2

UtterAccess VIP
Posts: 1,462



Yes it can be done, and quite easily (good news)!

Let's say you definea button to run your custom procedure

<button id="customButton1" label="Run My Custom Procedure" size="normal" onAction="RunMyProc" imageMso="RegionLayoutMenu"/>

Then you create a call back to run your procedure

'Callback for customButton1 onAction
Sub RunMyProc(control As IRibbonControl)
LaunchProc
End Sub

So what in fact is happening, is your ribbon button calls the Sub GenWip which in turn Call your procedure LaunchProc


Go to the top of the page
 
+
williams9969
post Mar 28 2012, 05:06 AM
Post #3

UtterAccess Ruler
Posts: 1,888
From: US Army / Iraq



Thanks for the help.

Is still not working however.

I applied everything you said but still says macro is not available.

Any ideas?

Thanks!

Dan
Go to the top of the page
 
+
DanielPineault
post Mar 28 2012, 09:55 AM
Post #4

UtterAccess VIP
Posts: 1,462



Where are you seeing "macro is not available"? Is that the exact error message? Is there an error number?
Go to the top of the page
 
+
williams9969
post Mar 28 2012, 10:04 AM
Post #5

UtterAccess Ruler
Posts: 1,888
From: US Army / Iraq



Thanks.

I get the message when i press the button i created on the ribbon.

I appreciate your help

Dan
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 02:48 PM