Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stepping through Code | Excel Discussion (Misc queries) | |||
stepping chart | Charts and Charting in Excel | |||
Stepping Problem, | Excel Programming | |||
Stepping through cells | Excel Programming | |||
Macros - stepping left in a macro | Excel Programming |