LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default module won't quit as expected

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile Error in Hidden Module: Module 1 Mim Excel Programming 3 January 23rd 10 12:22 AM
VBA code in one Module referencing Public Variables Declared inanother Module failing Khurram Excel Programming 5 March 11th 09 11:01 PM
vba advice how 2get a input box to quit by entering the word quit+ 4 a msgbox to disp RELWOD85[_4_] Excel Programming 3 August 1st 05 07:11 PM
Calls from sheet module to ThisWorkbook module quartz[_2_] Excel Programming 2 June 23rd 05 03:37 PM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM


All times are GMT +1. The time now is 03:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"