ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   shortcut keys in VBA (https://www.excelbanter.com/excel-programming/344347-shortcut-keys-vba.html)

Gary''s Student

shortcut keys in VBA
 
What is the easiest way to display the shortcut keys assigned to subs within
a module from VBA?
--
Gary's Student

David McRitchie

shortcut keys in VBA
 
I would add a debug.print statements to
listfunctions and sub (see buildtoc.htm) look for "application.onkey"
and include the workbook and module name in front
remember that VBA is case sensitive.

Dependent upon the shortcut being on the same line, but presume you
are documenting your own code.

Since you can turn shortcuts on and off and have several within a
module, it wouldn't work well to add a column to show a shortcut
but the debug should work okay and you can paste that into something else.

http://www.mvps.org/dmcritchie/excel/buildtoc.htm
http://www.mvps.org/dmcritchie/excel.../listfsubs.txt
---HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]My Excel Pages:
http://www.mvps.org/dmcritchie/excel/excel.htmSearch Page: http://www.mvps.org/dmcritchie/excel/search.htm "Gary''s Student"
wrote in message ...
What is the easiest way to display the shortcut keys assigned to subs within
a module from VBA?
--
Gary's Student




Gary''s Student

shortcut keys in VBA
 
Thank you very much David. I received a workbook with lots of sub and very
poor documentation on the shortcuts. I copied all the sub onto a worksheet
as text and looked for "application.onkey". Sure enough, I found them all!
This has saved me lots of time.

Thanks again
--
Gary''s Student


"David McRitchie" wrote:

I would add a debug.print statements to
listfunctions and sub (see buildtoc.htm) look for "application.onkey"
and include the workbook and module name in front
remember that VBA is case sensitive.

Dependent upon the shortcut being on the same line, but presume you
are documenting your own code.

Since you can turn shortcuts on and off and have several within a
module, it wouldn't work well to add a column to show a shortcut
but the debug should work okay and you can paste that into something else.

http://www.mvps.org/dmcritchie/excel/buildtoc.htm
http://www.mvps.org/dmcritchie/excel.../listfsubs.txt
---HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]My Excel Pages:
http://www.mvps.org/dmcritchie/excel/excel.htmSearch Page: http://www.mvps.org/dmcritchie/excel/search.htm "Gary''s Student"
wrote in message ...
What is the easiest way to display the shortcut keys assigned to subs within
a module from VBA?
--
Gary's Student





David McRitchie

shortcut keys in VBA
 
You're welcome, guess there was only one module involved, perhaps
even only one subroutine, so a lot easier than coding. .

"Gary''s Student" wrote...
Thank you very much David. I received a workbook with lots of sub and very
poor documentation on the shortcuts. I copied all the sub onto a worksheet
as text and looked for "application.onkey". Sure enough, I found them all!
This has saved me lots of time.





All times are GMT +1. The time now is 11:20 AM.

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