H
Hardy
Hi,
Gonig mad with something probably quite simple.
Using code below to check for date value in range
Sub CheckSwapsDate()
Dim SwapsDataCheck As Range
Workbooks("Book1").Activate
Worksheets("Links").Activate
With Worksheets("Links").Range("A28:A48")
Set SwapsDataCheck = .Find("24/03/2004", LookIn:=xlValues)
If SwapsDataCheck Is Nothing Then
MsgBox "Data not found"
QuitFlag = True
End If
End With
End Sub
In Links worksheet, dates appear as dd mmm yyyy format and in cell (i
formula edit box) as xx/mm/yyyy format. The are not text in th
worksheet. If, in the worksheet, I use Edit Find and put in 24/03/200
it finds that date in the list. Using this alone, or within quotes i
above code does not work, or with date serial number. Code works fine
as if I change one date in list to 12 and find 12 using above code, th
MsgBox does not show.
Any thoughts appreciated,
Thanks
Gonig mad with something probably quite simple.
Using code below to check for date value in range
Sub CheckSwapsDate()
Dim SwapsDataCheck As Range
Workbooks("Book1").Activate
Worksheets("Links").Activate
With Worksheets("Links").Range("A28:A48")
Set SwapsDataCheck = .Find("24/03/2004", LookIn:=xlValues)
If SwapsDataCheck Is Nothing Then
MsgBox "Data not found"
QuitFlag = True
End If
End With
End Sub
In Links worksheet, dates appear as dd mmm yyyy format and in cell (i
formula edit box) as xx/mm/yyyy format. The are not text in th
worksheet. If, in the worksheet, I use Edit Find and put in 24/03/200
it finds that date in the list. Using this alone, or within quotes i
above code does not work, or with date serial number. Code works fine
as if I change one date in list to 12 and find 12 using above code, th
MsgBox does not show.
Any thoughts appreciated,
Thanks