Case Sensitive Issue?

K

Ken

Excel 2000 ... I am not at all familiar with Visual
Basic ... I only record Macros ...

Above said ... I have the following code lines (non-
recorded) in a Macro ... Issue is ... it appears to be
case-sensitive when checking the "Yes" & I do not want it
to be.

If ActiveSheet.Range("D25").Value <> "Yes" Then
a = MsgBox("Must answer YES to ... Is ALL Data
Correct?", vbOKOnly, "ATTENTION!")
Exit Sub
End If

==> Can you provide appropriate fix? ... Thanks ... Kha
 
T

Tom Ogilvy

If lcase(ActiveSheet.Range("D25").Value) <> "yes" Then
a = MsgBox("Must answer YES to ... Is ALL Data
Correct?", vbOKOnly, "ATTENTION!")
Exit Sub
End If
 
F

Frank Kabel

Hi
change the line
if ActiveSheet.Range("D25").Value <> "Yes" Then

to
if LCase(ActiveSheet.Range("D25").Value) <> "yes" Then
 
B

Bob Phillips

Ken,

How does D25 get populated. You could add Data Validation to it to ensure
that you only get what you want in there.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
K

Ken

Thanks All ... Kha
-----Original Message-----
Hi
change the line
if ActiveSheet.Range("D25").Value <> "Yes" Then

to
if LCase(ActiveSheet.Range("D25").Value) <> "yes" Then



--
Regards
Frank Kabel
Frankfurt, Germany


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top