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: 29
Default Exit Sub?

Hello, I could use some help with my code. This code
checks to make sure there are dates in Col. E for every
every entry in Col. C. The first problem I have is if I
click OK in the MsgBox and OK in the InputBox, the macro
stops without forcing me to enter a date. The second
problem is that I'd like this macro to execute first, then
call several others. Even if this macro stops executing,
the others behind it run. It doesn't look like Exit Sub
will do what I need either, and if a date is missing in
Col. E, I really need to force the user to input the date,
have the date check macro finish checking Col. E, and then
call the other macros. What am I missing (maybe Santa will
bring me a brain)? Any help will be much appreciated!

Sheets("Pacc AD").Select
Range("C24").Select
Dim Value1
Do Until ActiveCell = ""

If ActiveCell < "" And ActiveCell.Offset(0, 2) < "" Then
ActiveCell.Offset(1, 0).Select

Else: Check = MsgBox("Missing date in Column E!",
vbCritical, "Please check your dates!")
ActiveCell.Offset(0, 2).Select
Value1 = InputBox("Enter the missing date")
ActiveCell.FormulaR1C1 = Value1
ActiveCell.Offset(1, -2).Range("A1").Select

End If
Loop
End Sub
 
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
Cancel/Exit Sub Howard Excel Discussion (Misc queries) 3 December 16th 08 09:53 PM
Exit Sub Jeff Excel Discussion (Misc queries) 2 March 1st 08 06:21 PM
Excel 07 won't exit Elle Setting up and Configuration of Excel 0 July 27th 07 12:40 AM
Run when exit PH NEWS Excel Worksheet Functions 1 July 18th 06 03:53 PM
Exit via macro only? Brisbane Rob Excel Discussion (Misc queries) 1 October 13th 05 01:16 PM


All times are GMT +1. The time now is 01:51 AM.

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"