ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Where is a macro shortcut key stored in a module? (https://www.excelbanter.com/excel-programming/293816-where-macro-shortcut-key-stored-module.html)

Christiane

Where is a macro shortcut key stored in a module?
 
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.


---
Message posted from http://www.ExcelForum.com/


Chip Pearson

Where is a macro shortcut key stored in a module?
 
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


"Christiane " wrote
in message ...
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.


---
Message posted from http://www.ExcelForum.com/




Christiane[_2_]

Where is a macro shortcut key stored in a module?
 
Thanks Chip.

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

--
Message posted from http://www.ExcelForum.com


Dave Peterson[_3_]

Where is a macro shortcut key stored in a module?
 
Tools|macro|macros
Select your macro, then click options and you'll see a spot for specifying the
shortcut key.



"Christiane <" wrote:

Thanks Chip.

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

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson



All times are GMT +1. The time now is 12:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com