macro error

S

SteveDB1

morning all.
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 with this macro.
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.
----------------------------------------------------
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'm guessing here, and am not sure that this would be what I'd need.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top