![]() |
|
#1
|
|||
|
|||
![]() What is your question? How much effort do you expect people to devote to your issue based on the effort that you made to define it? |
#2
|
|||
|
|||
![]()
Not exactly sure how you're missing the question. My problem is defined above...twice, I might add, since it looked like this site hadn't taken it the first time. How much more do you want?
Quote:
|
#3
|
|||
|
|||
![]()
There was nothing above my post when I replied earlier. Just the thread title.
I'm assuming you have a common button OnAction macro defined in your RibbonX and a Button OnAction macro something like the following in your VBA project: Code:
Sub ButtonOnAction(control As IRibbonControl) Dim pCall As String Select Case control.ID Case "Btn1", "Btn2", "Btn3", "Btn4" '... etc. modMain.DoSomethingWithThisButton control.Tag 'Use the control tag property to define a variable argument. Case Else 'Do Nothing End Select End Sub |
#4
|
|||
|
|||
![]()
Not sure why there was nothing there. I even accidentally posted it twice in the same thread.
This is the first I've heard about iRibbonControl. I have to confess to being a VB rookie, and programming is not my forte to boot. I've always found programming waaaaay more confusing than other people have. I put your code into my VB, but I'm not sure how to call ButtonOnAction because I don't know what argument to put in the calling sub. I get the error message "ByRef argument type mismatch." I know I'm putting an object type as the argument instead of an instance, but I don't know how to reference iRibbonControl; if it's supposed to be something VB is passing, shouldn't it already have a name? I have to admit I've Googled Object.ID, System.ID, Application (which returns, simply, "Microsoft Word"), Office.ribbonUI, ByVals, examples, everything, and I'm more lost than when I started. Shouldn't this be as easy as assigning test(1) to a ribbon button instead of just test and having to go through all these programming gymnastics just to do something so simple? sub test() call ButtonOnAction(iRibbonControl) end sub |
![]() |
Tags |
macro, microsoft word 2010, ribbon |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
tinfanide | Excel Programming | 2 | 10-13-2014 06:10 AM |
![]() |
ilcaa72 | Word VBA | 1 | 01-28-2014 03:04 PM |
How to import the customized ribbon to Word without overwriting the existing Ribbon? | SharonSh | Word VBA | 0 | 09-26-2013 11:47 PM |
How to pass parameters to a .msg file? | HereNow | Outlook | 0 | 11-05-2012 10:38 AM |
Excel 2010 Ribbon look like 2007's Ribbon | esotop | Excel | 0 | 03-22-2011 07:05 PM |