Thread: msgBox
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jan Karel Pieterse Jan Karel Pieterse is offline
external usenet poster
 
Posts: 535
Default msgBox

Hi April27,

I have a problem with my help menue so please dont just refer to it. i want
to have a messagebox that pops up when the user presses a button. the message
box shall ask the user if he(she is sure if he wants to abort. i just dont
get the syntax. I know to write the text on the box but how to choose how
many and what type of buttons etc. i dont know. i dont know how to connect an
event to certain button in the message box. please help me on this one!!!!



Sub MsgBoxDemo()
Select Case MsgBox("What do you want to do?" _
, vbAbortRetryIgnore + vbQuestion, "MsgBoxDemo")
Case vbAbort
MsgBox "Abort!", vbCritical
Case vbRetry
MsgBox "Retry!", vbExclamation
Case vbIgnore
MsgBox "Ignore", vbInformation
End Select

End Sub


Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com