#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default msgbox

could anyone please give me an example of the correct syntax for making a msgbox with a "yesnocancel" choice of buttons - every time i think i am there i get a message asking for me to add a "=" after my close bracket and i dont know what to put in there. please help!

Marcus
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default msgbox

Marcus,

Post what you have when you get the message.

VB is probably looking for you to assign the result to a variable so that it
can be used later on ie:

Answer = MsgBox("Do you want to ...?", vbYesNoCancel, "... Dialog")
If Answer = vbYes Then
'Code for Yes
ElseIf Answer = vbNo Then
'Code for No
Else
'Code for Cancel
End If

Dan E


"Marcus" wrote in message ...
could anyone please give me an example of the correct syntax for making a msgbox with a "yesnocancel" choice of buttons - every

time i think i am there i get a message asking for me to add a "=" after my close bracket and i dont know what to put in there.
please help!

Marcus



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default msgbox

Hi Marcus

Sub test()
Select Case MsgBox("Yo da man?", _
vbYesNoCancel + vbQuestion, "Yo")
Case vbYes
MsgBox "You da man"
Case vbNo
MsgBox "OK..."
Case vbCancel
MsgBox "Sheesh"
End Select
End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please.

"Marcus" wrote in message
...
could anyone please give me an example of the correct syntax for making a msgbox with a

"yesnocancel" choice of buttons - every time i think i am there i get a message asking for
me to add a "=" after my close bracket and i dont know what to put in there. please help!

Marcus



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default msgbox

Marcus

msgbox "Test",vbYesNoCancel

Regards

Trevor


"Marcus" wrote in message
...
could anyone please give me an example of the correct syntax for making a

msgbox with a "yesnocancel" choice of buttons - every time i think i am
there i get a message asking for me to add a "=" after my close bracket and
i dont know what to put in there. please help!

Marcus



Reply
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
msgbox flow23 Excel Discussion (Misc queries) 0 January 10th 06 03:25 PM
Msgbox Bernd[_2_] Excel Programming 0 October 24th 03 10:20 AM
MsgBox redmad Excel Programming 1 August 1st 03 12:18 AM
MsgBox Dave Peterson[_3_] Excel Programming 0 July 23rd 03 02:11 AM
MsgBox Phil Perry Excel Programming 1 July 9th 03 07:38 PM


All times are GMT +1. The time now is 02:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"