View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nick Cranham Nick Cranham is offline
external usenet poster
 
Posts: 62
Default Another Quick Simple VBA question (if...then statement)

abxy,
You're practically there with your English:

If (ComboBox1.Text="January") AND (Now()<#2/2/04) Then
CheckBox1.Enabled = False
End If

The backets are not required, but it makes the logic clearer.
Also, I don't think you really want to hard code a date, especially one that
is already in the past.

NickHK

"abxy " wrote in message
...
in VB, how do i write:

if Combobox1 = "January" and today's date(system date) isn't equal to
2/2/04 or later then checkbox1.enabled = false

thanks! : )


---
Message posted from http://www.ExcelForum.com/