The new sheet did not display the whole data after I click "All" button once to display all the data in new sheet after clearing the filter. However, it only shows the whole data when I click "All" button twice.
Here is my code:
Sub Reset1_button()
Application.ScreenUpdating = False
Dim LastRow As Long
Dim LRow As Long
LastRow = WorksheetFunction.Max(Sheets("SALES").Cells(Rows.Count, "A").End(xlUp).Row, 2)
LastRow = LastRow + 1
LRow = WorksheetFunction.Max(Sheets("ONE_ALLIANZ_REPORT").Cells(Rows.Count, "A").End(xlUp).Row, 18)
LRow = LRow + 1
Range("A19:AQ" & LRow).Clear
Sheets("SALES").Select
If (ActiveSheet.AutoFilterMode And ActiveSheet.FilterMode) Or ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
Sheets("SALES").Select
ActiveSheet.Range("A3:AQ" & LastRow).Copy
Sheets("ONE_ALLIANZ_REPORT").Select
ActiveSheet.Range("A19").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveCell.Select
End Sub