Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Quick commandbars question (97/SR2)

    Hopefully this won't be a very taxing question and someone out there will know the answer:

    I have a custom command bar called "RuntimeToolbar". On it are a number of items, 1 of which is "Account Records" with 3 sub items. Of these 3 items i'd like to be able to disable them by code, for which I need the code reference to them. I tried the line below which I based on an old post about command bars but it didn't seem to work:

    CommandBars("RUNTIMETOOLBAR").Controls("Account Records").Controls("Advanced Search").Enabled = False

    Hopefully I have made an obvious error which someone will be able to easily point out to me.
    Any help would be much appreciated as i'm running out of words to type into the search facility on both this and the MSDN page, which will narrow down the search.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Quick commandbars question (97/SR2)

    Try <A target="_blank" HREF=http://support.microsoft.com/default.aspx?scid=kb;EN-US;q177361>MSKB article Q177361</A>. The example code demonstrates how to do this. If you have trouble with the new MSKB interface (I hate it!) post back and I'll post the code.
    Charlotte

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Quick commandbars question (97/SR2)

    Hi Phil,
    That syntax looks fine to me. Have you checked the spelling of each control (e.g. should there be spaces between the words or not)? Do you get an error or does it just not do anything?
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Quick commandbars question (97/SR2)

    Thanks Rory for your reply.
    I double checked the spellings and they all seemed fine. The errors I got were about SQL linked tables but I think that may have been due to some functions which were running that I didn't know about (I making changes to a well established database that I don't really know much about (in at the deep end and all that!)).

    However........

    Thanks Charlotte for your reply. I managed to get it working with the function you provided a link for and this also fixed the other problem I was having with the buttons and variables!

Posting Permissions

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