Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default How do I view the value of a variable in my code?

There are a few things you can do:
1) Put MsgBox MyVar at various places in code if you want to pop up the
values from time to time to see what is happening.
2) If the code is paused (break mode) you can use the immediate pane and
print the values, e.g.:
print MyVar
or simply:
? MyVar
3) Open up the locals Window: it shows the current value of all variables in
a "tree" type structure (for the objects)

Immediate Pane and Locals window are available in View menu

"Bill_S" wrote:

In the VBA window how can I check the current value of one of the variables
in my code?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default How do I view the value of a variable in my code?

Thank you. Inserting the MsgBox MyVar within the code was helpful.

"K Dales" wrote:

There are a few things you can do:
1) Put MsgBox MyVar at various places in code if you want to pop up the
values from time to time to see what is happening.
2) If the code is paused (break mode) you can use the immediate pane and
print the values, e.g.:
print MyVar
or simply:
? MyVar
3) Open up the locals Window: it shows the current value of all variables in
a "tree" type structure (for the objects)

Immediate Pane and Locals window are available in View menu

"Bill_S" wrote:

In the VBA window how can I check the current value of one of the variables
in my code?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
View the code in a add-in sh0t2bts Excel Worksheet Functions 9 April 3rd 23 07:33 PM
can i link a variable cost code with a variable sum I need help!! Excel Discussion (Misc queries) 0 August 1st 08 11:40 AM
VBA Code to switch view Adrian[_7_] Excel Programming 2 August 29th 04 10:14 PM
Capture Custom View in a Variable Randy[_10_] Excel Programming 1 July 11th 04 06:56 AM
Mouse in Code View Sean McPoland[_2_] Excel Programming 1 February 5th 04 04:49 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"