Hello,
My Range is Col A and criteria in L1. when workbook open it should take the value from L1 and find in the Range & go to the particular cell address.
Range & Criteria is DATE
below code is not giving desired result. if this can be modified or another lines of code will help.
Private Sub Workbook_open()
Dim strdate As date
Dim rCell As Range
strdate = Range("L1").Value
Set rCell = Cells.Find(What:=strdate, After:=Range("A1"), LookIn:=xlValues _
, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
If rCell Is Nothing Then
MsgBox ("nothing")
Else
rCell.Select
End If
End Sub
Bookmarks