+ Reply to Thread
Results 1 to 8 of 8

customUI script problem (XML)

  1. #1
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    customUI script problem (XML)

    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.

  2. #2
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    Re: customUI script problem (XML)

    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.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: customUI script problem (XML)

    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 ?

  4. #4
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    Re: customUI script problem (XML)

    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.

  5. #5
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    Re: customUI script problem (XML)

    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.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: customUI script problem (XML)

    Quote Originally Posted by dschmitt
    Regarding your question (b): You are adding new buttons. All of them will be added at runtime. There are no replacements.
    I think you misinterpreted my question... using your first example:

    Please Login or Register  to view this content.
    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 ?

    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.

  7. #7
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    Re: customUI script problem (XML)

    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.

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: customUI script problem (XML)

    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1