![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 3
|
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 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
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 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
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 | |
|
New Member
Join Date: Mar 2002
Posts: 3
|
Quote:
|
|
|
|
|
|
|
#5 | |
|
New Member
Join Date: Mar 2002
Posts: 3
|
Quote:
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. |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|