Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dick - I figured I was missing something simple like that!
Just for the sake of the thread, this is how I implimented the change: If Dir("\\NetworkShare\Pause.Excel") < "" Then Kill ("\\NetworkShare\Pause.Excel") Stop End If I had to put the Stop AFTER the Kill statement, so that the Pause.Excel file gets removed, fostering a 1-Time Event. Again, thanks! Ray -- "Trying to make reports so easy... even a monkey could run ''em!" "Dick Kusleika" wrote: On Thu, 24 Jul 2008 06:04:00 -0700, RayportingMonkey wrote: Thanks - and yes, using code like: If Dir("\\NetworkShare\Pause.Excel") < "" Then MsgBox "You wanted to get my attention?" Kill ("\\NetworkShare\Pause.Excel") End If would throw a message box, thus interrupting code execution. Now maybe this is just me getting stuck on a particular train of thought, but I want the "event", be it a watch or be it with code like the above to actually enter break-mode. Again, I can do it with a watch, but I can't figure out how to script an on-open event that would Add my Watch criteria. Further, I can use code like in my example, but couldn't figure out how to throw the Ctrl-Break. I tried code like this, but it didn't do what I expected (stop the code as if Ctrl-Break was pressed on the keyboard). If Dir("\\NetworkShare\Pause.Excel") < "" Then SendKeys ("^{BREAK}") Kill ("\\NetworkShare\Pause.Excel") End If I also tried removing the () like this: SendKeys "^{BREAK}" to no avail... I don't think you can program in a watch statement. I should have mentioned that in my first reply, but I was busy getting ahead of myself. To throw the equivalent of Ctl+Break, use Stop If Condition Then Stop End if But, of course, that's not like a watch because it only works when that If block executes, whereas a watch would break at any time the condition is met. -- Dick Kusleika Microsoft MVP-Excel http://www.dailydoseofexcel.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't enter break mode at this time ERROR | Excel Discussion (Misc queries) | |||
can't enter break mode at this time | Excel Programming | |||
Can't enter break mode at this time | Excel Discussion (Misc queries) | |||
Can't enter break mode | Excel Programming | |||
received message: Can't enter break mode at this time | Excel Programming |