J
J. Lund
I am trying to search a column of date that contains dates that were
calculated. (starting date + # of days out = end date). I am using the
following search macro code. This code works when the date is entered into
the column. It does not work when the date is calculated with the above
formula.
Any ideas why this doesn't work for a calculated field?
Sub Find_Date()
Dim dteVariable As Date
dteVariable = #5/1/2007#
FindDate ActiveSheet.Range("u1:u100"), dteVariable
End Sub
Public Sub FindDate(r As Range, target As Variant)
Dim r1 As Range
Set r1 = r.Find(target)
If r1 Is Nothing Then
MsgBox target & " was not found."
Else
r1.Select
End If
End Sub
calculated. (starting date + # of days out = end date). I am using the
following search macro code. This code works when the date is entered into
the column. It does not work when the date is calculated with the above
formula.
Any ideas why this doesn't work for a calculated field?
Sub Find_Date()
Dim dteVariable As Date
dteVariable = #5/1/2007#
FindDate ActiveSheet.Range("u1:u100"), dteVariable
End Sub
Public Sub FindDate(r As Range, target As Variant)
Dim r1 As Range
Set r1 = r.Find(target)
If r1 Is Nothing Then
MsgBox target & " was not found."
Else
r1.Select
End If
End Sub