View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default What is wrong with this code?

or this, no need to select anything:

Sub Macro1()

If Sheets("Sheet1").Range("H20").Text = "FALSE" Then
MsgBox "NOT CHECKED"
Else
MsgBox "CHECKED"
End If

End Sub

--


Gary


"sungen99" wrote in
message ...

Sub Macro1()

Sheets("Sheet1").Select
If Range("H20").Select = "FALSE" Then
MsgBox "NOT CHECKED"
Else
MsgBox "CHECKED"
End If

End Sub



H20 contains the result of a checkbox of either a False or True. Seems
im always getting the Checked response which means im obviously not
getting the result form the sheet correctly.

Thanks again,
Ken


--
sungen99
------------------------------------------------------------------------
sungen99's Profile:
http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=475516