#1   Report Post  
James Hamilton
 
Posts: n/a
Default Message Box

Hi,

I want a message box to appear (VB OKonly) if the value of a cell is either
Yes or No.

My code is:

Range("A1").Select
If ("A1") = "Yes" Then

MsgBox "THE REPORTS HAVE BEEN UPDATED", , "INFORMATION"

End If

Note: the Yes or No is selected using a data validation list.

HELP! Thanks

  #2   Report Post  
Norman Jones
 
Posts: n/a
Default Message Box

Hi James,

Change:

If ("A1") = "Yes" Then


to:

If Range("A1") = "Yes" Then


BTW it is rarely necessary or desirable to make selections. Therefore, you
could dispense with the line:

Range("A1").Select


---
Regards,
Norman



"James Hamilton" wrote in message
...
Hi,

I want a message box to appear (VB OKonly) if the value of a cell is
either
Yes or No.

My code is:

Range("A1").Select
If ("A1") = "Yes" Then

MsgBox "THE REPORTS HAVE BEEN UPDATED", , "INFORMATION"

End If

Note: the Yes or No is selected using a data validation list.

HELP! Thanks



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
How do I control where the input message appears? Bernina27 Excel Discussion (Misc queries) 2 September 16th 05 03:04 AM
Adding an error message at close of file when criteria are met Dave Excel Discussion (Misc queries) 3 August 12th 05 07:56 PM
Calculations And Order In Macros Carl Bowman Excel Discussion (Misc queries) 4 February 23rd 05 10:53 PM
when opening excel I receive a message that says file can't be fo. Ken Excel Discussion (Misc queries) 3 February 22nd 05 12:13 AM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM


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