J
jgriffs
Hi!
I wish to have an Excel sheet which simply looks at the date and if
that date or past, delete a range. This should be so simple but I can't
get it to work.
Here's what I have:
Sub deleterange()
'
'dim datadate
datadate = Range("b3").Value
' If datadate > 38747 Then
Range("C5
11").Select
selection.Clear
MsgBox "datadate is " & datadate
End Sub
With the above, the variable "datadate" comes into the message box as
38747 so the logic or syntax of my If is off. And after a bunch of
time, the various "Help" files have not.
Thanks for your time and fix
John
I wish to have an Excel sheet which simply looks at the date and if
that date or past, delete a range. This should be so simple but I can't
get it to work.
Here's what I have:
Sub deleterange()
'
'dim datadate
datadate = Range("b3").Value
' If datadate > 38747 Then
Range("C5
11").Selectselection.Clear
MsgBox "datadate is " & datadate
End Sub
With the above, the variable "datadate" comes into the message box as
38747 so the logic or syntax of my If is off. And after a bunch of
time, the various "Help" files have not.
Thanks for your time and fix
John