Re: Save as, not overwrite
- From: "Trevor Shuttleworth" <Trevor@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 28 May 2007 23:31:48 +0100
Suggest you remove:
Application.DisplayAlerts = False
The code *is* doing a Save As ... you just choose to allow it to overwrite
an existing file.
Regards
Trevor
"Carlee" <Carlee@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AB1CED17-5803-400F-A2D2-F12428DB9CAC@xxxxxxxxxxxxxxxx
Hi there,
The following code saves the spread*** in question, overwriting any
existing with the same name, that is found on the Desktop.
Question:
How can i change this code such that it prompts me to Save As, rather than
overwrite?
Any help is appreciated greatly,
pathToUserDesktop = "C:\Documents and Settings\" & _
Get_Win_User_Name() & "\Desktop\" & newWorkbookName
'save new workbook, but don't nag
'user with "file exists" message
Application.DisplayAlerts = False
With Workbooks(destBook)
'renames it while saving it
'will overwrite existing file of same name
.SaveAs pathToUserDesktop
'close it
.Close
End With
Application.DisplayAlerts = True
Application.ScreenUpdating = True
--
Carlee
.
- Prev by Date: Re: Insert into a range from a two dimensional array
- Next by Date: Re: vba chart xlValue axis title truncated, one series name omitted
- Previous by thread: Array to Range assignments behave different going horizontally and vertically
- Next by thread: NEWBIE needs BIG help with Macro
- Index(es):