Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default msgbox yes or no

MsgBox Range("sale!hr2").Value, vbYesNo

If vbYes Then
MsgBox "yes", vbOKOnly
End If
If vbNo Then
MsgBox "no", vbOKOnly
End If

it does both yes and no, im sure im missing something simple...i just dont
know what it is

thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default msgbox yes or no

reply= MsgBox(Range("A1").Value, vbYesNo)

If reply = vbYes Then
MsgBox "yes", vbOKOnly
Else
MsgBox "no", vbOKOnly
End If


HTH

"choice" wrote:

MsgBox Range("sale!hr2").Value, vbYesNo

If vbYes Then
MsgBox "yes", vbOKOnly
End If
If vbNo Then
MsgBox "no", vbOKOnly
End If

it does both yes and no, im sure im missing something simple...i just dont
know what it is

thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default msgbox yes or no

Dear Choice,

Try this:

If MsgBox(Range("sales!hr2"), vbYesNo) = vbYes Then
MsgBox "Yes"
Else
MsgBox "No"
End If

Best regards

John

"choice" wrote in message
...
MsgBox Range("sale!hr2").Value, vbYesNo

If vbYes Then
MsgBox "yes", vbOKOnly
End If
If vbNo Then
MsgBox "no", vbOKOnly
End If

it does both yes and no, im sure im missing something simple...i just dont
know what it is

thanks in advance



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
If then MsgBox Todd Huttenstine[_3_] Excel Programming 2 November 26th 03 09:43 PM
MsgBox Ed Excel Programming 3 November 23rd 03 05:44 PM
MsgBox Help! rbanks Excel Programming 4 November 21st 03 04:17 PM
msgbox Marcus Excel Programming 3 November 19th 03 11:35 PM
MsgBox Dave Peterson[_3_] Excel Programming 0 July 23rd 03 02:11 AM


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