#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default pop up box

Hi,
How can I create a pop up box that asks a question and then takes answers in
yes/no?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default pop up box

ans = MsgBox ("Continue (yes) or quit (no)?",vbYesNo)
If ans = vbYes Then
'etc.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"swati" wrote in message
...
Hi,
How can I create a pop up box that asks a question and then takes answers
in
yes/no?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default pop up box


Look at the MsgBox function in VBA help...

If MsgBox("Did you do it? ", vbQuestion + vbYesNo, "Swati") = vbYes Then
'something
Else
'something else
End If
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"swati"
wrote in message
Hi,
How can I create a pop up box that asks a question and then takes answers in
yes/no?
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default pop up box

Probably the quickest is the MsgBox.

Sub popUp()
PopUp = MsgBox("WILL THIS DO THE TRICK?", vbYesNo + vbQuestion, "MY POP-UP")
If PopUp = vbYes Then
MsgBox "That's It"
Else
MsgBox "Not What I wanted"
End If
End Sub

"swati" wrote:

Hi,
How can I create a pop up box that asks a question and then takes answers in
yes/no?

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



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