Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro Stepping

When stepping through a macro where values are being changed ( e.g.as in a
loop) is it possible to "see" the current values.

For Example :-

For x= 1 to 19
For y = x+1 to 20
If Cells(x,2) = Cells (y,2) Then ' do something'
next y
next x

I would like to be able to see the values of x & y in the VBA pane as I step
through th macro.

Reagrds
George



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Macro Stepping

Hi George,

Try using the Locals Window to see all variables. Alternatively, open the
Watch Window and add thr required variables or expressions.

Either window may be opened from the View menu.


---
Regards,
Norman


"George" wrote in message
...
When stepping through a macro where values are being changed ( e.g.as in a
loop) is it possible to "see" the current values.

For Example :-

For x= 1 to 19
For y = x+1 to 20
If Cells(x,2) = Cells (y,2) Then ' do something'
next y
next x

I would like to be able to see the values of x & y in the VBA pane as I
step through th macro.

Reagrds
George





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default Macro Stepping

If you hover your mouse pointer over the variable name you'll see the
value displayed.



George wrote:
When stepping through a macro where values are being changed ( e.g.as in a
loop) is it possible to "see" the current values.

For Example :-

For x= 1 to 19
For y = x+1 to 20
If Cells(x,2) = Cells (y,2) Then ' do something'
next y
next x

I would like to be able to see the values of x & y in the VBA pane as I step
through th macro.

Reagrds
George


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Macro Stepping

George,
As well as the other replies, you can print to the Immediate window. e.g.
Debug.Print "x=" & x, "y= & y

NickHK

"George" wrote in message
...
When stepping through a macro where values are being changed ( e.g.as in a
loop) is it possible to "see" the current values.

For Example :-

For x= 1 to 19
For y = x+1 to 20
If Cells(x,2) = Cells (y,2) Then ' do something'
next y
next x

I would like to be able to see the values of x & y in the VBA pane as I

step
through th macro.

Reagrds
George





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
Stepping through Code Jim May Excel Discussion (Misc queries) 9 October 25th 07 01:40 PM
stepping chart Petje Charts and Charting in Excel 2 July 7th 06 10:22 PM
Stepping Problem, ben Excel Programming 3 February 8th 06 04:17 PM
Stepping through cells Kirk[_5_] Excel Programming 1 November 29th 04 07:21 PM
Macros - stepping left in a macro Rich H. Excel Programming 2 October 5th 03 06:45 PM


All times are GMT +1. The time now is 10:58 AM.

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

About Us

"It's about Microsoft Excel"