Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you print variable values? 2

Status
Not open for further replies.

monak

MIS
Jul 2, 2002
22
US
I am having trouble testing what values I am getting in my variables. I know the command is "Print". I tried Print and just the variable but a error saying I need a object to use this command? How can I get my values to print?
 
monak,

Debug.Print val1, val2, .... valn

will send the value(s) to the Immediate Window.

Hope this helps :) Skip,
SkipAndMary1017@mindspring.com
 
If you want to see how the value of your variable changes over the course of your macro, you could always try adding it to the "Watch" window.

There is an icon to do this on the toolbar. You will of course have to make the Watch window visible (use the View pull-down menu to do this) and you will have to step through the macro in break mode.
 
Thank you so much for your help!!! I will try both of these sugestions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top