LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default gallery in 2007 UI Ribbon w/xml

morning all.
I've been trying to modify my ribbon menu to include a gallery because of
the amount of data I want to place in the gallery-- a 6 x 6 arrayed layout as
opposed to the standard vertical list (I've got a few others that I'd like
arrayed in a gallery as well, so this will be the first of 3 or 4 galleries I
want, perhaps more).
While I've gotten the gallery to display correctly, I have no idea how to
create the macro to activate the individual elements for the gallery itself.

I've done some digging around on the various blogs, discussions, MSDN
libraries, etc.... the MS developers have on galleries, and I either don't
understand what they're saying, or they're not concise enough for me to "get
it."

So, I'm here, hat in hand, asking for your help.

I've found the following code for VBA that appears to link a 12 month
gallery to the xml code, and each of the 12 months' names shown in the
gallery. With my modifications of course-- or my attempts at modifying it.
-----------------------------
Sub InsertSectNo(Control As IRibbonControl, selectedId As String,
selectedIndex As Integer)

Dim text As String
Dim SectionName() As String
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
--------------------------
And below is a single sample of 36 macros that I WAS using for my
"SectionName" macros before the idea for wanting a gallery came into play.
-------------------------
Sub Sect01(Control As IRibbonControl)
ActiveCell.FormulaR1C1 = "1"
With ActiveCell.Characters(Start:=1, Length:=5).Font
End With
End Sub

The Sect01 macro is to link back to the InsertSectNo macro so that when I
click on 1 in my gallery it'll insert the number 1 in to the destination
cell. And if I select 36, or some number-- that I've selected-- in between 1
and 36, it'll insert that number in to the selected cell.
6 5 4 3 2 1
7 8 9 10 11 12
18 17 16 15 14 13
19 20 21 22 23 24
30 29 28 27 26 25
31 32 33 34 35 36

is the configuration of my array in the ribbon.
please advise if you require further info or clarification.
Thank you.



 
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
Help with Excel 2007 Ribbon Ayo Setting up and Configuration of Excel 2 November 6th 09 05:13 AM
Minimize 2007 ribbon via VBA? Charlotte E Excel Programming 3 February 22nd 09 05:47 AM
xls 2007 ribbon oldLearner57 Excel Discussion (Misc queries) 2 June 13th 08 01:22 AM
How can I add the OneNote 2007 icon to the ribbon in Excel 2007? Todd Excel Discussion (Misc queries) 6 February 14th 08 11:22 PM
2007 Ribbon dropdown [email protected] Excel Programming 0 January 4th 08 10:52 PM


All times are GMT +1. The time now is 09:00 AM.

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

About Us

"It's about Microsoft Excel"