LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 155
Default Save as, not overwrite

Hi there,

The following code saves the spreadsheet 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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save As / Overwrite Brent E Excel Discussion (Misc queries) 4 October 23rd 08 08:19 PM
How to save a file without overwrite or save a copy? SettingChange Setting up and Configuration of Excel 1 November 3rd 05 02:10 AM
Save as Overwrite prompt Steph[_3_] Excel Programming 1 February 26th 05 12:05 AM
Save As Overwrite [email protected] Excel Programming 1 September 15th 04 11:09 PM
Save .csv with overwrite Kevin Excel Programming 1 April 27th 04 02:38 AM


All times are GMT +1. The time now is 11:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"