One approach:
Sub test()
Dim var As Variant
var = Range("AL2").Value
If VarType(var) = vbDate Then
MsgBox Format(var, "dd-mmm-yyyy") & " is date"
ElseIf IsNumeric(var) Then
MsgBox var & " is number"
End If
End Sub
--
Rob van Gelder -
http://www.vangelder.co.nz/excel
"rleonard" wrote in message
...
I am trying to enter in macro cod a value from a worksheet range
the worksheet range is "AL2"; value in range can be a number or date!
I believe following code in macro enters value into macro
Range(Range("AL2")).value.select
When editing macro want to know value or date that has been entered?
Need code to display in macro what has been entered?
Also, what code uses that value so it can be used with other code?
Thanks
Bob Leonard