New Member
January 6, 2021
Hello, I have this macro that was running correctly until Dec 29. Now, I have an error in the line below, could you please help me to understand the error?
Sub AdvanceFilter_Copy()
Dim rgdata As Range
Dim rgCriteria As Range
Dim rgOutput As Range
Dim Rg As Range
Set Rg = ThisWorkbook.Worksheets("Output").Range("A1").CurrentRegion
Rg.Offset(1).Clear
Set rgdata = Workbooks("filename.xlsm").Worksheets("Schedule-A").Range("A11").CurrentRegion Error Here
Set rgCriteria = ThisWorkbook.Worksheets("Ultera Scheduled Time").Range("J2").CurrentRegion
Set rgOutput = ThisWorkbook.Worksheets("Output").Range("A1").CurrentRegion
rgdata.AdvancedFilter xlFilterCopy, rgCriteria, rgOutput
MsgBox "Hi " & Application.UserName & _
vbNewLine & "The report has been updated", , "Schedule A"
End Sub
1 Guest(s)