Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default UIRibbon/VBA/XML question

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default UIRibbon/VBA/XML question

Hi Steve

I not test ribbonx for gallery's but I put it on my list to do this weekend.

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"SteveDB1" wrote in message ...
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.


__________ Information from ESET Smart Security, version of virus signature database 3946 (20090318) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature database 3946 (20090318) __________

The message was checked by ESET Smart Security.

http://www.eset.com



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default XML, Ribbon...

Ron,
Thank you, thank you, thank you.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default XML, Ribbon...

Hi Steve

I play with galleries for the first time and create a small example workbook.
Mail me private if you want to take a look add this tester

I will test more and maybe will add a example workbook on my ribbon page.




--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Steve" wrote in message ...
Ron,
Thank you, thank you, thank you.


__________ Information from ESET Smart Security, version of virus signature database 3947 (20090319) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature database 3949 (20090319) __________

The message was checked by ESET Smart Security.

http://www.eset.com



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
UIRibbon- XML part SteveDB1 Excel Programming 1 March 26th 09 06:09 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good davegb Excel Programming 1 May 6th 05 06:35 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 0 April 27th 05 07:46 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 23 April 23rd 05 09:26 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 0 April 22nd 05 03:30 PM


All times are GMT +1. The time now is 01:11 PM.

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"