Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
MSGBOX not working
Good afternoon, all,
Has anyone ever come across instances of MSGBOX not displaying, even when it's obvious that the code is processing the command? I'm using MSGBOXes to debug some code - some of them work and some of them don't, thought they all should, as the code goes past them all. Any thoughts? Thanks in advance Pete |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
MSGBOX not working
Hi Peter,
Try putting a breakpoint at the first msgbox and when the code stops, use the immediate window to check the condition which should trigger the display. This will also verify that the relevant line is not being bypassed due to earlier branch in the code - do you have an error handler for example? --- Regards, Norman "Peter Rooney" wrote in message ... Good afternoon, all, Has anyone ever come across instances of MSGBOX not displaying, even when it's obvious that the code is processing the command? I'm using MSGBOXes to debug some code - some of them work and some of them don't, thought they all should, as the code goes past them all. Any thoughts? Thanks in advance Pete |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
MSGBOX not working
Norman,
I sorted it - I had a SendKeys command that was supposed to send some {Enter}s to suppress warning messages - unfortunately, whilst they were used in the application from whiuch i copied the code, they weren't needed in this one - hence the MsgBox es effectively had their "OK" buttons clicked, so didn't appear to appear (if you see what I mean) That'll teach me to take a break more often in the afternoon! :-) Thanks for your time Pete "Norman Jones" wrote: Hi Peter, Try putting a breakpoint at the first msgbox and when the code stops, use the immediate window to check the condition which should trigger the display. This will also verify that the relevant line is not being bypassed due to earlier branch in the code - do you have an error handler for example? --- Regards, Norman "Peter Rooney" wrote in message ... Good afternoon, all, Has anyone ever come across instances of MSGBOX not displaying, even when it's obvious that the code is processing the command? I'm using MSGBOXes to debug some code - some of them work and some of them don't, thought they all should, as the code goes past them all. Any thoughts? Thanks in advance Pete |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
MSGBOX not working
Crazybass2,
Thanks for your advice, but it was something a bit more simple than I thought - I had a SendKeys command that was supposed to send some {Enter}s to suppress warning messages - unfortunately, whilst they were used in the application from whiuch i copied the code, they weren't needed in this one - hence the MsgBox es effectively had their "OK" buttons clicked, so didn't appear to appear (if you see what I mean) That'll teach me to take a break more often in the afternoon and use application.displayalerts=false! :-) Thanks for your time Pete "crazybass2" wrote: You can also use F8 to follow the code as it's running. "Norman Jones" wrote: Hi Peter, Try putting a breakpoint at the first msgbox and when the code stops, use the immediate window to check the condition which should trigger the display. This will also verify that the relevant line is not being bypassed due to earlier branch in the code - do you have an error handler for example? --- Regards, Norman "Peter Rooney" wrote in message ... Good afternoon, all, Has anyone ever come across instances of MSGBOX not displaying, even when it's obvious that the code is processing the command? I'm using MSGBOXes to debug some code - some of them work and some of them don't, thought they all should, as the code goes past them all. Any thoughts? Thanks in advance Pete |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculate working days but change working week | Excel Discussion (Misc queries) | |||
Msgbox not working | Excel Programming | |||
MsgBox | Excel Programming | |||
Adding sales from a non working day to the previous working day | Excel Programming | |||
MsgBox | Excel Programming |