+ Reply to Thread
Results 1 to 8 of 8

Identify a custom menu control

  1. #1
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Identify a custom menu control

    Can't figure out what the code is looking for here...
    Using this code to add the item to the command bar:
    Please Login or Register  to view this content.
    I want to disable the item on worksheet activate. I found this code but can't figure what the name of the item is ???
    Please Login or Register  to view this content.
    The "create menu" code is a private sub in workbook module; the menu "disable item" code is in the worksheet module, is that right?
    Thank you!
    Last edited by pprseller; 10-31-2009 at 01:02 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Identify a custom menu control

    What determines that the cotrol should be disabled?

    Can you attach a workbook with the full code.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Re: Identify a custom menu control

    HI RoyUK, Thanks for helping. I made a simple example to attach. The menu code I found here. I think it might even have been yours. Did alot of research on menu controls and using the sheet deactivate seems to be the best way for me but I cant figure out the names of the controls. There are three menu items (controls?) that need to do this:

    When ws "Order" is active, "Export to site list" and "Select site" are disabled.
    When any ws that ends in "...SD" is active, the "Address book" is disabled.

    Thank you very much.

    Mockorder2.xls

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Identify a custom menu control

    I've added two Public Booleans to control whether the controls are enabled. These are triggered by the SheetActivate event of the Workbook Module so will be triggere by activating any sheet.

    Also moved the Create menu code to a Standard module
    Last edited by royUK; 10-31-2009 at 12:45 PM.

  5. #5
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Re: Identify a custom menu control

    Thanks again, but I hate to say - I don't see any changes at all. I clicked your attachment and it opens as Read only but its still just the code I sent. Sorry. . . .

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Identify a custom menu control

    Looks like I uploaded the wrong one
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Re: Identify a custom menu control

    Thank you. That's perfect. And may I take a moment to say thank you for all your help and time that you spend here with us. (I read the thread about crazy posts and ungrateful people.) I don't get paid for this part of the job. This is just to make my life and my 8 co-workers lives a little easier. My boss doesn't even know I do it. I enjoy learning it and have been inspired to continue coding. My office knows the names "Roy from the UK" and "shg" and "Leith". They give me feedback on what we still need and then ask me "what did the guru's tell you?". I just wanted you all to know that some of us appreciate you and do give you credit for all your talent. Thanks again!

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Identify a custom menu control

    Much appreciated.

+ 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