Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel menu with XML (Excel 2003/ XML (pro UK))

    Hi

    Toying with an idea of an easy to use 'XL menu builder tool' that requires no programming skills.
    What I want is to make a generic XLA, that reads any given XML file. And based on that constructs the menu.

    All user needs to do then, is to fill in tags in an XML file. Using hierarchies.

    Thought of an XML looking something like this:

    <Root>

    <Item01>
    <IsCommandbar>TRUE</IsCommandbar>
    <Temporary>TRUE</Temporary>
    <Title>MyBar<Title>
    </Item01>

    <Item02>
    <IsCommandbar>FALSE</IsCommandbar>
    <Level>01</Level>
    <Rank>01</Rank>
    <Title>MyTitle<Title>
    <Type>MsoDropDown</Type>
    </Item02>

    <Item03>
    <IsCommandbar>FALSE</IsCommandbar>
    <Level>01</Level>
    <Rank>02</Rank>
    <Title>MyLevel1<Title>
    <Type>MsoButton</Type>
    <MacroOnAction>RunAnotherSub</MacroOnAction>
    </Item03>

    <Item04>
    <IsCommandbar>FALSE</IsCommandbar>
    <Level>02</Level>
    <Rank>01</Rank>
    <Parent>01</Parent>
    <Title>MyLevel2Menu<Title>
    <Type>MsoButton</Type>
    <MacroOnAction>RunSub</MacroOnAction>
    </Item04>

    </Root>

    Naturally the amount of items in the menu will be a lot longer, but I hope the above is enough to give you an idea of what I have in mind?
    It will most likely only be able to achieve the most basic things in comparison to what menus do today, but that's acceptable for starters.

    What I need is indications on how to code the XLA in order to make it read from the XML.

    I'm new to using XML in Excel, so I'm kind of hoping that some of you magicians will be able to point me in the right direction - hopefully off to a good start...

    TIA
    Bests,
    RD


    PS: Wish there were a knob on the TV to turn up the intelligence. There's a knob called "brightness," but that doesn't work

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Excel menu with XML (Excel 2003/ XML (pro UK))

    This might help: <post:=343,644>post 343,644</post:>

    Because it's for Outlook, the CommandBars collection belongs to a different object, but otherwise, it should be analogous.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel menu with XML (Excel 2003/ XML (pro UK))

    What is wrong with using a table of cells in Excel itself as opposed to XML (which is harder to edit IMO)?

    There are ample examples to find on table driven commandbar creation on the web.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  4. #4
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel menu with XML (Excel 2003/ XML (pro UK))

    Hi Jan,

    Thanks for the tip.

    Do you have a good keyword to get off to a good start...(maybe sth. like 'table driven commandbar' ?)
    Bests,
    RD


    PS: Wish there were a knob on the TV to turn up the intelligence. There's a knob called "brightness," but that doesn't work

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel menu with XML (Excel 2003/ XML (pro UK))

    Search google for the book called "Professional Excel Development" and purchase a copy. Worth it's weight in platinum and contains exactly this.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  6. #6
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel menu with XML (Excel 2003/ XML (pro UK))

    Hi Jan,

    Thanks for the tip. Book looks exciting - have ordered it / ;o)

    btw: Reason for not stating the "using-Excel-itself" angle was that I somehow thought it to be to simple (don't know why really)
    Looking in the always clear rear view mirror it seems so simple and obvious to try to achieve a very simple menu build that way.

    So - thanks for straigthening out my crooked thoughts <mega grin>
    Bests,
    RD


    PS: Wish there were a knob on the TV to turn up the intelligence. There's a knob called "brightness," but that doesn't work

  7. #7
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel menu with XML (Excel 2003/ XML (pro UK))

    Simpler is pretty much always better (provided you get the same functionality).
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

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