Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You have to cloce any open workbooks.
"Sabosis" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It is not necessary to post multiple times. See your original post.
"Sabosis" wrote in message ... 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Disregard the multiple post message.
"JLGWhiz" wrote in message ... It is not necessary to post multiple times. See your original post. "Sabosis" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compile Error in Hidden Module: Module 1 | Excel Programming | |||
VBA code in one Module referencing Public Variables Declared inanother Module failing | Excel Programming | |||
vba advice how 2get a input box to quit by entering the word quit+ 4 a msgbox to disp | Excel Programming | |||
Calls from sheet module to ThisWorkbook module | Excel Programming | |||
Variable from a sheet module in a class module in XL XP | Excel Programming |