exit sub
Posted by David on August 08, 2000 1:43 AM
is there a way to stop a macro dead in its tracks.
I am trying to use end sub and about halfe the time it doesn't stop it.
This is in the original macro. I want it to stop where it is marked.
If ICounter = 400 Then
Answer = MsgBox("That date was not found. Would
_you Like to try to add this Date to the
_database", vbOKCancel, "Date Missing")
If Answer = vbOK Then
Application.Run "'book1.xls'!Unhideall"
Workbooks(shortbookname).Activate
Sheets("summary").Select
Range("B1") = Idate
Call runadddate(part)
Application.Run "'sheet1.xls'!macro1"
Else
Call ERRORCODE(3)
Exit Sub 'Want to stop here
End If
End If