Empty Macro Problem (for a User Add-In Menu)
Empty Macro Problem (for a User Add-In Menu)
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Empty Macro Problem (for a User Add-In Menu)

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Hi

    We have an excel file that already has a custom menu build menu (like File, Edit, View etc ...) inside using some other macro that is locked. We wish to record a macro for a series of actions that involve different selections of that Custom Menu. The macro that is recorded simply is empty when recording is done. Any smart ideas to get around this ? I have tried very simple recordings just to make sure that the macro has a problem with that Custom Menu and I am 100% positive about it. It simply doesn't write anything inside the "Sub". Thanks in advance for any help.

  2. #2
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sounds like you're going to have to get some help writing the code "from scratch". Give us an example of what you are trying to select on this menu, including the name in the title bar and if there are any underscores in the name. For example, to do a "Save As" in Excel I would:

    1. Select "File" PopUp on the "Worksheet Menu Bar" (note, the "F" has an underscore)
    2. Select the "Save As..." CommandButton. (the "A" has an underscore)

    Maybe some kind person will then help you.

    HTH

  3. #3
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    The following code will run the associated procedure on a custom menu:

    CommandBars("CommandbarName").Controls("ControlName").Execute

    The custom menu in named CommandbarName and the button is named ControlName.

    Hope this helps.
    Kind regards, Al.

  4. #4
    New Member
    Join Date
    Mar 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-18 10:19, Al Chara wrote:
    The following code will run the associated procedure on a custom menu:

    CommandBars("CommandbarName").Controls("ControlName").Execute

    The custom menu in named CommandbarName and the button is named ControlName.

    Hope this helps.
    Kind regards, Al.
    Thanks I will try that and let you know about the result. Thanks again.

  5. #5
    New Member
    Join Date
    Mar 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    On 2002-03-18 10:06, Mark O'Brien wrote:
    Sounds like you're going to have to get some help writing the code "from scratch". Give us an example of what you are trying to select on this menu, including the name in the title bar and if there are any underscores in the name. For example, to do a "Save As" in Excel I would:

    1. Select "File" PopUp on the "Worksheet Menu Bar" (note, the "F" has an underscore)
    2. Select the "Save As..." CommandButton. (the "A" has an underscore)

    Maybe some kind person will then help you.

    HTH
    Thanks Mark,

    Looks like the next approach by Al is more direct, if it doesn't work out, I will bother you guys again. Thanks so much.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com