Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Student With A Question On MS Office 2007 Ribbon Eddy Excel Discussion (Misc queries) 3 January 7th 10 09:54 PM
The Ribbon cday Excel Discussion (Misc queries) 2 June 11th 09 06:01 PM
Ribbon HMT New Users to Excel 4 May 2nd 09 10:15 PM
ribbon question SteveDB1 Excel Programming 0 November 7th 08 07:01 PM
Can we modify any of the ribbon tabs or create new ribbon tabs? Scott Sornberger New Users to Excel 2 March 19th 08 11:41 AM


All times are GMT +1. The time now is 01:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"