Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
2003/2007
What is the correct Watch Window syntax to halt code processing? I want to have the code halt when: 'Sheet1'!A2 changes value (from blank to i.e. 4) TIA |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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). -- Cheers, Shane Devenshire " wrote: 2003/2007 What is the correct Watch Window syntax to halt code processing? I want to have the code halt when: 'Sheet1'!A2 changes value (from blank to i.e. 4) TIA |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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). |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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). |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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). |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The OP actually said "halt", which is exactly what it does.
-- Regards Roger Govier "ShaneDevenshire" wrote in message ... 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). |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Roger,
Do you actually mean Range("A1") for Range("A1)? TIA EagleOne "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. |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do you actually mean Range("A1") for Range("A1)?
Yes, I did. Apologies for the typo. Didn't even notice when I copied and pasted it again. -- Regards Roger Govier wrote in message ... Roger, Do you actually mean Range("A1") for Range("A1)? TIA EagleOne "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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stop window saying code execution interrupted at startup? | Excel Discussion (Misc queries) | |||
Watch Window | Excel Worksheet Functions | |||
Watch Window | Excel Discussion (Misc queries) | |||
WATCH WINDOW | Excel Programming | |||
Watch Window | Excel Programming |