Hi, I am getting the following error 'Run time error 43: Object doesn't support this property or method ' on the line
Set FoundDate = wb2.ws2.Rows("A").Find(DateValue(Now), LookIn:=xlValues, lookat:=xlWhole)
My code is
Sub FindToday()
Dim FoundDate As Range
Dim wb1 As Workbook
Dim wb2 As Workbook
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Set wb1 = ActiveWorkbook
Set wb2 = Workbooks("Test.xlsx")
Set ws1 = wb1.ActiveSheet
Set ws2 = wb2.Worksheets("Control")
Set FoundDate = wb2.ws2.Rows("A").Find(DateValue(Now), LookIn:=xlValues, lookat:=xlWhole)
If Not FoundDate Is Nothing Then
wb1.ws1.Range("B2:B17").Copy
FoundDate.Offset(0, 15).PasteSpecial xlPasteValues, xlPasteSpecialOperationNone, False, False
End If
End Sub
Any help is much appreciated
Bookmarks