Consulting

Results 1 to 6 of 6

Thread: Excel 2007 Ribbon Problem...

  1. #1

    Question Excel 2007 Ribbon Problem...

    Hi Friends,
    I've made two excel addins for excel 2007 version. When its load, automatically a tab called utilities.
    I want to know...
    1.) Whether we can check its installed or not from vba code.
    2.) If its installed then want to add some more group in the same tab.
    3.) It its not installed yet, then create new tab called utilities.
    I know how to add a new tab or add commands in an existing tab, but I'm not able to check for existing tab's load status

    When i load my first addin its working successfully, but when i installed the second addin its make an new tab with the same name.
    I've attached the code for both macros

    I want to add in existing tab.
    Any help on above will be appreciated.
    Attached Files Attached Files

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,443
    Location
    I am confused, I see only one workbook, I see no addins, I see n o code in the workbook, so I cannot see any of the things that you describe.

    When you load a file with custom XML that custom XML will automatically build your ribbon changes. You cannot add to the ribbon from within VBA, but you can have groups.buttons that are hidden are startup and then become visible from within VBA when some event occurs.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3

    Question

    Wen u start the file, it'll automatically add an tab in ribbon.

    As you say, i cannot change or add the ribbon from withing VBA,
    I agree, I only want to know if its possible with Custom XML.


    Quote Originally Posted by xld
    I am confused, I see only one workbook, I see no addins, I see n o code in the workbook, so I cannot see any of the things that you describe.

    When you load a file with custom XML that custom XML will automatically build your ribbon changes. You cannot add to the ribbon from within VBA, but you can have groups.buttons that are hidden are startup and then become visible from within VBA when some event occurs.

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,443
    Location
    Cross-posted at ExcelForum, CodeCage, and MrExcel (that I know of).
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    In any good writeup on the Ribbon, there's an explaination of how to use idQ and Namespace that allow two different addins to add to the same custom group—they just need to refer to that custom group by its qualified name

    [VBA]

    customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" xmlns:x="myNameSpace"

    and then

    button idQ="x:myButton" …

    [/VBA]

    Paul

  6. #6
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    Ken has a lot of good information (as always)

    http://www.excelguru.ca/blog/2007/03...ong-workbooks/


    But this is what I did by saving your Demo as Demo1 and Demo2, then changing the CustomUI, saving both as add ins, and then loading both add ins

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" xmlns:x="myNameSpace">
    <ribbon>
    <tabs>
    <tab idQ="x:TbUtilities" label="Utilities" >
    <group idQ="x:Grp1" label="MyGroup">
    <button idQ="x:Btnx1" label="Start Data Extraction1" size="normal" onAction="OnCall" image="Import" />
    <button idQ="x:Btnx2" label="Settings1" size="normal" onAction="OnCall" image="Settings" />
    </group>
    </tab>
    </tabs>
    </ribbon>
    </customUI>

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" xmlns:y="myNameSpace">
    <ribbon>
    <tabs>
    <tab idQ="y:TbUtilities" label="Utilities" >
    <group idQ="y:Grp1" label="MyGroup">
    <button idQ="y:Btny1" label="Start Data Extraction2" size="normal" onAction="OnCall" image="Import" />
    <button idQ="y:Btny2" label="Settings2" size="normal" onAction="OnCall" image="Settings" />
    </group>
    </tab>
    </tabs>
    </ribbon>
    </customUI>

    Paul
    Attached Images Attached Images

Posting Permissions

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