ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   getting a variable's name (https://www.excelbanter.com/excel-programming/314610-getting-variables-name.html)

Philipp

getting a variable's name
 
Hello
I'm tired of writing debug code like:
debug.print "myValue = " & myValue

Is it possible to write a function to get a variable name and display it
with its value as above?

Thanks Phil

Tom Ogilvy

getting a variable's name
 
You can use the watch window in the VBE and step through the code.

You can put in a breakpoint.

See Excel VBA help for details.

--
Regards,
Tom Ogilvy

"Philipp" wrote in message
...
Hello
I'm tired of writing debug code like:
debug.print "myValue = " & myValue

Is it possible to write a function to get a variable name and display it
with its value as above?

Thanks Phil





All times are GMT +1. The time now is 07:18 PM.

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