Stu Dapples
Active Member
- Joined
- Jan 12, 2009
- Messages
- 252
I have created a workbook which contains all the code I need to take figures, do calcs, generally make my quoting life easy - even to the point it will save a copy of the workbook to a specified directory and use the individual quote number as it's filename... Happy Days!
Unfortunately, on the file that is generated, when it is opened, it runs the "clear sheets" script I wrote and bins all the info
So, I used the code here to set the Save As and it works fine, I assumed that by setting the filetype I could use "xlWorkbookNormal" to stop the code...
I have had it working but now it simply saves the workbook as a "file" which I can't open!
Can anyone tidy up my syntax to get it save to the path, with the filename as set in the string but in a format which will prevent the macros running (or get rid of them completely) in the the copy version?
Unfortunately, on the file that is generated, when it is opened, it runs the "clear sheets" script I wrote and bins all the info
So, I used the code here to set the Save As and it works fine, I assumed that by setting the filetype I could use "xlWorkbookNormal" to stop the code...
I have had it working but now it simply saves the workbook as a "file" which I can't open!
Can anyone tidy up my syntax to get it save to the path, with the filename as set in the string but in a format which will prevent the macros running (or get rid of them completely) in the the copy version?
VBA Code:
Private Sub EndOfQuote()
Dim fPath As String, fName As String
Sheet9.Activate
fPath = "\\svwa-fs1\orwin_man\Change Management\2019 Projects\UK Service Centre\Quotes\"
fName = Sheet1.Range("B1").Value
ActiveWorkbook.SaveCopyAs (fPath & fName)
End Sub