View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
StargateFan StargateFan is offline
external usenet poster
 
Posts: 61
Default Multiple message boxes, one after the other in AutoOpen or other?

On Mon, 3 Aug 2009 19:10:01 -0700, OssieMac
wrote:

If I have interpretted your request properly.

Sub Auto_Open()
Dim MyMsgBox

MyMsgBox = MsgBox("Script line 1." & vbCrLf & _
"Script line 2", _
vbOKCancel + vbExclamation, "REMEMBER ...")


Select Case MyMsgBox
Case vbOK
'Your code here for OK
MsgBox "User selected OK"
Case vbCancel
MsgBox "User selected cancel"
Exit Sub
End Select


End Sub


<lol No, sorry. I really wasn't clear! Sorry 'bout that! <g
I have to do this better ...

Okay, I have a message box come up in AutoOpen. It works great but it
would be really helpful to give the user more information via another
message box or two, something like this:

AutoOpen: msg box comes up with OK and CANCEL.

If user presses OK, another message pops up, different from the first.
But it also has OK and CANCEL.

If user presses OK to that one, a third and final "reminder" or
message pops up. Here it can have just an OK button as CANCEL would
be superfluous <g.

If at any time, though, the user presses Cancel, no further message
boxes come up.

I hope I got it better this time. <g

Oh, should mention what the above does. It just regurgitates back to
user which button was pressed. When OK was pressed, a message box
comes up saying "User selected OK". When they press cancel, another
box pops up saying "User selected cancel". Nifty, but, um, not
exactly something that I can find a user for here <vbg.

Thanks! Much appreciated! :oD

--
Regards,

OssieMac


"StargateFan" wrote:

I can't find the answer to this one; perhaps I'm googling/searching
for the wrong search terms.

I have an AutoOpen script that works just great, but I need to string
at least one other message to it after pressing OK. (And cancel would
stop the boxes, naturally.)

Sub Auto_Open()
MyMsgBox = MsgBox("Script line 1." & vbCrLf & _
"Script line 2", _
vbOKOnly + vbExclamation, "REMEMBER ...")
End Sub

How could I tack on another message box, or perhaps 2, to the above?

Thank you! :oD