Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Declare variable as what?
Hello
Could someone advise me as what the following should be declared as? Ans = MsgBox("If boxes are empty you will wipe out the list - continue?", vbYesNo, "Caution") If Ans = vbNo Then Exit Sub TIA Kenny |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Declare variable as what?
Long. vbYes and vbNo are long integer constants.
On Wed, 27 Oct 2004 23:20:36 +0100, "N E Body" wrote: Hello Could someone advise me as what the following should be declared as? Ans = MsgBox("If boxes are empty you will wipe out the list - continue?", vbYesNo, "Caution") If Ans = vbNo Then Exit Sub TIA Kenny |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Declare variable as what?
as Long
-- HTH RP "N E Body" wrote in message ... Hello Could someone advise me as what the following should be declared as? Ans = MsgBox("If boxes are empty you will wipe out the list - continue?", vbYesNo, "Caution") If Ans = vbNo Then Exit Sub TIA Kenny |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Declare variable as what?
Kenny
Dim Ans As Integer Regards Trevor "N E Body" wrote in message ... Hello Could someone advise me as what the following should be declared as? Ans = MsgBox("If boxes are empty you will wipe out the list - continue?", vbYesNo, "Caution") If Ans = vbNo Then Exit Sub TIA Kenny |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Declare variable as what?
TNX Myrna
"Myrna Larson" wrote in message ... Long. vbYes and vbNo are long integer constants. On Wed, 27 Oct 2004 23:20:36 +0100, "N E Body" wrote: Hello Could someone advise me as what the following should be declared as? Ans = MsgBox("If boxes are empty you will wipe out the list - continue?", vbYesNo, "Caution") If Ans = vbNo Then Exit Sub TIA Kenny |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Declare variable as what?
Also you can do it like this, without declaring a variable:
If MsgBox("If boxes are empty you will wipe out the list - continue?", _ vbYesNo, "Caution") = vbNo Then Exit Sub End If RBS "N E Body" wrote in message ... Hello Could someone advise me as what the following should be declared as? Ans = MsgBox("If boxes are empty you will wipe out the list - continue?", vbYesNo, "Caution") If Ans = vbNo Then Exit Sub TIA Kenny |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Declare variable as what?
You can also declare it as VbMsgBoxResult and it will give you an auto-complete list of allowable values when you press the equals sign. -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "N E Body" wrote in message ... Hello Could someone advise me as what the following should be declared as? Ans = MsgBox("If boxes are empty you will wipe out the list - continue?", vbYesNo, "Caution") If Ans = vbNo Then Exit Sub TIA Kenny |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Declare Variable | Excel Programming | |||
Declare Variable | Excel Programming | |||
Declare Variable | Excel Programming | |||
Declare Variable | Excel Programming | |||
Declare Variable | Excel Programming |