Below is a customUI script. There is a problem with the customGroup2 script. If I delete the code for customGroup2 it works. Where is the mistake? I can't find it.
![]()
Please Login or Register to view this content.
Below is a customUI script. There is a problem with the customGroup2 script. If I delete the code for customGroup2 it works. Where is the mistake? I can't find it.
![]()
Please Login or Register to view this content.
Last edited by dschmitt; 06-11-2010 at 04:50 AM.
Below is another customUI script that also doesn't work. I think the problem in this one is conceptually related to the one I posted earlier.
I have trouble solving this problem because I can't find any examples online. There are lots of examples where one new tab is inserted or one custonGroup is inserted in one tab. But no examples where two tabs are inserted or modified or two custom groups are inserted in one tab.
If somebody could help that would be great.
![]()
Please Login or Register to view this content.
I know nothing of this stuff but the most obvious things to me at least would be:
a) does it matter you're creating multiple controls with the same name (even if they are in different "groups")
and/or in the case of the 2nd ex. multiple groups with the same name (different "tabs")
b) does it matter (1st example) that you're placing the 2nd "group" after the 1st which is only created at run-time ?
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
ya, good questions. I don't know. I am going to make myself a bit more familiar with this subject over the weekend. I also posted my problem over at the VBA Express Forum in the Office 2007 Ribbon UI section.
When I got a solution I will post it.
DunkeyOte, thanks again for your input.
Regarding your question (a): That was the problem
Regarding your question (b): You are adding new buttons. All of them will be added at runtime. There are no replacements.
Below the solution.
![]()
Please Login or Register to view this content.
I think you misinterpreted my question... using your first example:Originally Posted by dschmitt
In the above you are using the customGroup1 for the "insertAfterMso" property - my question was whether, given customGroup1 is itself created at run-time, you could do that ?![]()
Please Login or Register to view this content.
In your latter examples (working code) you are not adopting the above - rather each group is using the same insertAfterMso value and that value is seemingly a default rather than a custom creation.
Yes, I did misunderstood your question. I should have responded by saying that I didn't understand your question rather then stumbling an answer.
I believe you are right. You probably can not insert a button behind a button that you create earlier in the script. Although I don't know for sure because I didn't test for that.
I just noticed an odd thing. The script below which is part of the solution I posted inserts the group customGroup2 after the group Editing. There is no group Editing in that tab. I created that tab. It is empty. Funny thing is, it still works.
![]()
Please Login or Register to view this content.
I'm afraid (sounding like a broken record) I'm not the guy to ask... Andy Pope & co. are far more knowledgeable on this type of thing - I can't say I've ever customised the Ribbon.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks