Hi, I have been running a script for a number of years, we have recently been updated to 365 and part of the script no longer works. The script used to place an auto filter on to a page of data and filter to set parameters the copy filtered data and paste into different sheet within the same work book. It is the copy and paste that seems to have stopped working. Has anyone come across something similar.
Application.StatusBar = "GENERATE LIST OF LICENSES DUE TO EXPIRE"
Sheets("Import").Select
'Range("A1").Select
'Selection.AutoFilter
'ActiveSheet.Range("A:I").AutoFilter field:=9, Criteria1:=Expiry_Date, Operator:=xlAnd
Dim StartDate As Date
Dim EndDate As Date
StartDate = Date
EndDate = Date + 42
ActiveSheet.Range("I1:I5000").AutoFilter Field:=1, Criteria1:=">=" & CDbl(StartDate), Operator:=xlAnd, Criteria2:="<=" & CDbl(EndDate)
Range("A1:I5000").Select
Selection.Copy
Sheets("Due to Expire").Select
Range("A1").Select
ActiveSheet.Paste
Cells.EntireColumn.AutoFit
Application.StatusBar = "GENERATE LIST OF LICENSES DUE TO EXPIRE"
Sheets("Import").Select
'Range("A1").Select
'Selection.AutoFilter
'ActiveSheet.Range("A:I").AutoFilter field:=9, Criteria1:=Expiry_Date, Operator:=xlAnd
Dim StartDate As Date
Dim EndDate As Date
StartDate = Date
EndDate = Date + 42
ActiveSheet.Range("I1:I5000").AutoFilter Field:=1, Criteria1:=">=" & CDbl(StartDate), Operator:=xlAnd, Criteria2:="<=" & CDbl(EndDate)
Range("A1:I5000").Select
Selection.Copy
Sheets("Due to Expire").Select
Range("A1").Select
ActiveSheet.Paste
Cells.EntireColumn.AutoFit