Hi,
I have Excel 2010, and I'm getting an error message when I press the Clear and save button while using this invoice program.
The message is: The following features cannot be saved in macros-free workbooks - VB Project.
To continue saving as a macro-free workbook, click yes.
I have the option of YES or NO to save the file, but I want to get rid of this message.
If I click YES, a new (macro-free) file is saved to my DOCUMENTS folder as a sequenced file number.
If I click NO, I then get "run-time error 1004" message, which then leads me to debug the code.
The code I have is:
Dim NewFN As Variant
' Copy to a new workbook
ActiveSheet.Copy
NewFN = "C:\Users\Jim\Documents\OrderSheetJim" & Range("P4").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
NextOrder
End Sub
The line that is highlighted by excel (and needs to be debugged) is:
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
What is wrong?
Please help
I have Excel 2010, and I'm getting an error message when I press the Clear and save button while using this invoice program.
The message is: The following features cannot be saved in macros-free workbooks - VB Project.
To continue saving as a macro-free workbook, click yes.
I have the option of YES or NO to save the file, but I want to get rid of this message.
If I click YES, a new (macro-free) file is saved to my DOCUMENTS folder as a sequenced file number.
If I click NO, I then get "run-time error 1004" message, which then leads me to debug the code.
The code I have is:
Dim NewFN As Variant
' Copy to a new workbook
ActiveSheet.Copy
NewFN = "C:\Users\Jim\Documents\OrderSheetJim" & Range("P4").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
NextOrder
End Sub
The line that is highlighted by excel (and needs to be debugged) is:
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
What is wrong?
Please help