S
Sabosis
Hello-
I have the following code in a module so that on holidays, when there
is no data in the file, the code will see "b2" as a blank and kill the
code and exit excel. This works in other macrosI have, but this
particular macro will throw up an error message. Whether I hit End or
Debug, Excel will then shut down as planned. If I manually step
through the code, it works fine. Is there some sort of delay I need to
write into the code so that it has more time to trigger this event?
Thanks-
Scott
If Range("b2").Value = "" Then
Application.DisplayAlerts = False
Application.Quit
End If
I have the following code in a module so that on holidays, when there
is no data in the file, the code will see "b2" as a blank and kill the
code and exit excel. This works in other macrosI have, but this
particular macro will throw up an error message. Whether I hit End or
Debug, Excel will then shut down as planned. If I manually step
through the code, it works fine. Is there some sort of delay I need to
write into the code so that it has more time to trigger this event?
Thanks-
Scott
If Range("b2").Value = "" Then
Application.DisplayAlerts = False
Application.Quit
End If