Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Ribbon question
I have modified my UIRibbon to now include a gallery.
The gallery itself works, but the macro required to get it to activate the selection is throwing a compile error. I looked around some of the MSDN libraries, and found a 3 page article, to which I adapted my macro. Page 1, 12 month gallery. http://msdn.microsoft.com/en-us/library/aa338202.aspx But now, I've gone astray of what I actually need. I have a series of macros, that I need to link back to-- Sect01 through Sect36-- this macro. Each of these 36 macros are stand alone macros presently accessible through my non-gallery ribbon menu. I've been using them regularly since late 2007. I tried placing the OnAction="....." in each of my 'items', but that kept throwing not declared errors on every variation I could think of. And yes, I tried buttons, but gallery doesn't work with buttons, as I tried it-- and I tried a few different variations of that, even inserting one button element at a time, until it failed. Then, I found that the buttons would not allow me to configure the array the shape I wanted. I.e., they do a single column, and I want a 6 x 6. My code for the linking macro is below- based on the article sample referenced above. ---------------------------------------------------- Sub InsertSectNo(Control As IRibbonControl, selectedId As String, selectedIndex As Integer) Dim text As String Dim SectionName As Integer 'this is where my error keeps appearing 'the error says that it expected an array. My thinking is now I need something to 'call back to the Sect01 through Sect36 macros. but how? Select Case Control.ID Case "GalleryA" text = SectionName(selectedIndex + 1) 'I'd thought that my SectionName should be calling to the 36 macros I mention 'above. I've named the id # identical to the 36 macro names'. End Select Selection.InsertAfter text 'again, not sure if this is what I'd need. My goal is to have the value of the 'choice input into an excel cell where my cursor is located. End Sub ----------------------------------------------- Thank you for your helps. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Student With A Question On MS Office 2007 Ribbon | Excel Discussion (Misc queries) | |||
The Ribbon | Excel Discussion (Misc queries) | |||
Ribbon | New Users to Excel | |||
ribbon question | Excel Programming | |||
Can we modify any of the ribbon tabs or create new ribbon tabs? | New Users to Excel |