Hi Guru's
I am using this code someone developed for me to copy active sheet in current workbook to another workbook.
It works perfectly when I don't have any filters. The minute use filters on the original worksheet and execute the code my copied file is completely unreadable
Can someone assist with modifying this code to take into consideration if I have filtered columns
Dim extension As String
extension = ".xlsx"
' Copy Active tab to another file
' Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.CopyObjectsWithCells = False ' Does not copy Macro objects
ActiveSheet.Copy
With ActiveSheet.UsedRange
.Value = .Value
.Validation.Delete ' Removes all Drop Down Lists
End With
Set wbNew = ActiveWorkbook
wbNew.SaveAs ThisWorkbook.Path & "\" & Format(Date, "yyyy-mm-dd") & " " & ActiveSheet.Range("B3") & extension
' wbNew.SaveAs ThisWorkbook.Path & " " & ActiveSheet.Range("B3") & extension
wbNew.Close True
Application.DisplayAlerts = True
Application.CopyObjectsWithCells = True
Application.ScreenUpdating = True
Any assistance would be greatly appreciated
I am using this code someone developed for me to copy active sheet in current workbook to another workbook.
It works perfectly when I don't have any filters. The minute use filters on the original worksheet and execute the code my copied file is completely unreadable
Can someone assist with modifying this code to take into consideration if I have filtered columns
Dim extension As String
extension = ".xlsx"
' Copy Active tab to another file
' Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.CopyObjectsWithCells = False ' Does not copy Macro objects
ActiveSheet.Copy
With ActiveSheet.UsedRange
.Value = .Value
.Validation.Delete ' Removes all Drop Down Lists
End With
Set wbNew = ActiveWorkbook
wbNew.SaveAs ThisWorkbook.Path & "\" & Format(Date, "yyyy-mm-dd") & " " & ActiveSheet.Range("B3") & extension
' wbNew.SaveAs ThisWorkbook.Path & " " & ActiveSheet.Range("B3") & extension
wbNew.Close True
Application.DisplayAlerts = True
Application.CopyObjectsWithCells = True
Application.ScreenUpdating = True
Any assistance would be greatly appreciated