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

Hi Roger,

I agree, but he says the Watch Window codes the stop and you are saying, as
I would that you add the code to break within the module. Isn't this the
case?

--
Cheers,
Shane Devenshire


"Roger Govier" wrote:

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).