Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cancel/Exit Sub | Excel Discussion (Misc queries) | |||
Exit Sub | Excel Discussion (Misc queries) | |||
Excel 07 won't exit | Setting up and Configuration of Excel | |||
Run when exit | Excel Worksheet Functions | |||
Exit via macro only? | Excel Discussion (Misc queries) |