I have written code to export a sheet called "Imported Data" as a .xls workbook
Sub Export_SheetsasXls()
Dim NewName As String
Dim ws As Worksheet
With Application
.ScreenUpdating = False
On Error GoTo ErrCatcher
Sheets(Array("Imported Data")).Copy
On Error GoTo 0
For Each ws In ActiveWorkbook.Worksheets
ws.Cells.Copy
ws.[A1].PasteSpecial Paste:=xlValues
ws.Cells.Hyperlinks.Delete
Application.CutCopyMode = False
Cells(1, 1).Select
ws.Activate
Next ws
Cells(1, 1).Select
ActiveWorkbook.SaveCopyAs ThisWorkbook.Path & "\" & "BR1 Sales Upload" & ".xls"
ActiveWorkbook.Close SaveChanges:=False
.ScreenUpdating = True
End With
Exit Sub
ErrCatcher:
MsgBox "Specified sheets do not exist within this workbook"
End Sub
when Opening the file I get a message "file format and extension don't match-see attached message
It wold be appreciated if someone could amend my code
Bookmarks