S
SteveDB1
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
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