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: 39
Default stopping a macro based on a conditional

Maybe it's just been a long day, but I can't remember how I've done
this in the past. I'm trying to have a macro stop based on a
condition. It's coming from a form, but if things are done out of
order in one spot, things go bad, so I'm trying to force the user into
selecting a Week Beginning Date prior to checking a box. The week
beginning date loads down to [Data!b2] so this macro is checking to see
if there's anything there, if there is, it follows the code from there,
if that cell is blank though, I want it to pop up a message, then
return to the form (preferably without unloading and reloading the form
as the user will lose all of their entries to that point). Any ideas?
Here's what I've in this section now,

If MultipleBox = True Then
If [data!b2].Value = "" Then
MsgBox "Choose Initial Request Week First"
MultipleBox = False
End Sub
End If
'From here the remainder of the code goes . . .


Now I'm sure it's not end sub, but i can't remember what goes there -
i've tried stop (does nothing) and end function (gives an error, then
does nothing). Basically all i'm looking for is this, when the box is
checked (this is in the MultipleBox_AfterUpdate) if it's true, check to
see that the week beginning date has been selected, if that cell is
blank - pop up a message - set the box back to unchecked - stop this
macro while leaving the form running. Can someone point me back in the
right direction?

 
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
How do I set up a macro to repeat based on a conditional formula? moneycop Excel Discussion (Misc queries) 1 April 17th 09 02:25 AM
Stopping a Macro Samir[_3_] Excel Programming 6 March 6th 06 04:14 PM
Stopping a Macro Paul Excel Programming 2 December 7th 05 02:11 PM
stopping macro DPK Excel Programming 3 May 13th 04 06:50 AM
My Macro keeps stopping?? Sh0t2bts Excel Programming 5 October 28th 03 03:08 PM


All times are GMT +1. The time now is 08:35 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"