dan_sherbs
New Member
- Joined
- May 14, 2014
- Messages
- 25
Hi,
I have a tool that produces a set of outputs in the form of a quote in a tab called "SalesQuotation".
On this worksheet, i have a button which when clicked runs the following VBA
This works fine which opens up the quote. However, whilst this is open & i click the button again i get a run time error relating to Document not Saved.
How can i prevent this? Will the filename have to be unique or will it need to overwrite the existing one?
Many Thanks
Dan
I have a tool that produces a set of outputs in the form of a quote in a tab called "SalesQuotation".
On this worksheet, i have a button which when clicked runs the following VBA
Code:
Sheets("SalesQuotation").Range("A1:J70").ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\" & Environ$("Username") & _
"\Desktop\Customer_QUOTE.pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
This works fine which opens up the quote. However, whilst this is open & i click the button again i get a run time error relating to Document not Saved.
How can i prevent this? Will the filename have to be unique or will it need to overwrite the existing one?
Many Thanks
Dan