Hello,
I have the following code created in excel 2007 but the file is saved in excel 97-2003 format:
reportName = fileNamePrefix & " - " & currMthStr & " - " & psrFirstNameStr & " " & psrLastNameStr & ".xls"
I believe the error comes from the below code where I copy and paste certain sheets into a new workbook.:
Sheets(Array("PSR TEMPLATE CONTROL", "PSR CALCULATOR")).Copy
On Error GoTo 0
' Copy sheets
' Remove External Links, Hperlinks
' Make sure A1 is selected on all sheets
For Each ws In ActiveWorkbook.Worksheets
ws.Cells.Copy
ws.Cells.Hyperlinks.Delete
Application.CutCopyMode = False
Cells(1, 1).Select
ws.Activate
Next ws
Cells(1, 1).Select
Can it be that when you copy and paste into a new workbook and the workbook format is different, you get this error message? But how can that be if my report name has the correct extension format?
Thanks for your help.
I have the following code created in excel 2007 but the file is saved in excel 97-2003 format:
reportName = fileNamePrefix & " - " & currMthStr & " - " & psrFirstNameStr & " " & psrLastNameStr & ".xls"
I believe the error comes from the below code where I copy and paste certain sheets into a new workbook.:
Sheets(Array("PSR TEMPLATE CONTROL", "PSR CALCULATOR")).Copy
On Error GoTo 0
' Copy sheets
' Remove External Links, Hperlinks
' Make sure A1 is selected on all sheets
For Each ws In ActiveWorkbook.Worksheets
ws.Cells.Copy
ws.Cells.Hyperlinks.Delete
Application.CutCopyMode = False
Cells(1, 1).Select
ws.Activate
Next ws
Cells(1, 1).Select
Can it be that when you copy and paste into a new workbook and the workbook format is different, you get this error message? But how can that be if my report name has the correct extension format?
Thanks for your help.