Where is a macro shortcut key stored in a module?

C

Christiane

Hi,

When I create a macro from Excel, I usually assign it a shortcut key.

But when I go in the module, I cannot see where this information is
kept in the code.

Also, I have a second question.

Each time I create a new macro to be stored in the personal.xls
workbook, a new module is created.

When I cut and copy the macro to another module, the shortcut key
assigned no longer works.

Is there a way to have all the macros I create in the personal.xls
workbook go in the same module?

Any help will be appreciated.
Thank you.
 
C

Chip Pearson

Christiane,

The macro key code is stored in the VBA Module, as an Attribute.
If you export the module, and view it in a text editor such as
NotePad, you'll see an Attribute statement with the shortcut key
code. Attribute statements are used by the VBA Editor and
compiler, but are not visible in the code window.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
C

Christiane

Thanks Chip.

Is there a way I can change the shortcut key without having to redo th
macro
 
D

Dave Peterson

Tools|macro|macros
Select your macro, then click options and you'll see a spot for specifying the
shortcut key.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top