I'm new and any help appreciated ,the code below works fine in one spreadsheet but not in the one I need it to ! I get run time error 91- object variable or with block variable not set?
The aim is to find the given date in cell E2 in row 5
'Finddate Macro
Sub Finddate()
Dim MyDate As String
WorkSheets("Sheet1").Select
Range("E2").Select
MyDate = Format(ActiveCell.Value, "ddd-dd-mmm-yyyy")
WorkSheets("Sheet1").Rows(5).Find(What:=MyDate, LookIn:=xlValues).Activate
Application.Goto Selection, True
End Sub
Bookmarks