View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Roger Govier Roger Govier is offline
external usenet poster
 
Posts: 2,886
Default Syntax to stop code in Watch Window

Hi

If you have the line of code in your module highlighted, then DebugAdd
Watch will bring that line up as the default in the watch Window.

Or you could type in =Range("A1)=20
and set to Break on True

If you set the Watch to =Range("A1)
and set Break on Change, then every time the value in cell A1 changes
the code will halt.

--
Regards

Roger Govier


wrote in message
...
Shane,

Actually, I do mean the Watch Window ( VBA ExploereViewWatch Window.

In that window, one can halt the execution of code at the change of a
value.

I am not sure of the syntax to watch a cell value of a specified
sheet.

EagleOne

ShaneDevenshire wrote:

Hi,

I don't believe the Watch Window can stop code execution. Are you
sure you
mean the Watch Window, this window shows the value of a variable as
the macro
executes. This is in the VBE (Visual Basic Editor).