Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
XML, Ribbon...
Ron,
Thank you, thank you, thank you. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|