ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   shortcut key to macro variables (https://www.excelbanter.com/excel-programming/395274-shortcut-key-macro-variables.html)

Richard

shortcut key to macro variables
 
My macro variables are often long and hard to keep retyping.

When I'm programming a macro, is there a shortcut or pull down menu to
select variables already is use?

This would be faster and would also prevent mistyping.
--
Richard

JLGWhiz

shortcut key to macro variables
 
You can go to ViewLocals Window while you are stepping into a macro and it
will show all the variables in that particular macro. It will not give you a
menu of variables to pick from. There is nothing that I know of that will do
what you described. However, some code writers use the Dim declarations at
the top of the macro to track their variables by making the declaration as
soon as they assign the variable.

Another technique, is to keep the procedures short so that the number of
variables per procedure are minimized. Then, if you happen to use the same
variable in a different procedure, it will not cause an error. This concept
uses a master procedure to call a series of small procedures in their logical
order. It is easy to track your variables and it periodically frees up
memory so that the code runs better.

"Richard" wrote:

My macro variables are often long and hard to keep retyping.

When I'm programming a macro, is there a shortcut or pull down menu to
select variables already is use?

This would be faster and would also prevent mistyping.
--
Richard



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

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