Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Save file without prompting

Can you tell me how to write the VBA code or amend the code below t
save and overwrite the path of an existing file without excel promptin
the user to click yes to overwrite that file.

Thanks


ActiveWorkbook.SaveAs Filename:="C:\TEMP\file.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=Fals

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Save file without prompting

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:="C:\TEMP\file.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Application.DisplayAlerts = True

or

On error resume next
Kill "C:\TEMP\file.xls"
On Error goto 0
ActiveWorkbook.SaveAs Filename:="C:\TEMP\file.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False


--
Regards,
Tom Ogilvy

"andym " wrote in message
...
Can you tell me how to write the VBA code or amend the code below to
save and overwrite the path of an existing file without excel prompting
the user to click yes to overwrite that file.

Thanks


ActiveWorkbook.SaveAs Filename:="C:\TEMP\file.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False


---
Message posted from http://www.ExcelForum.com/



Reply
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
Stop prompting for save the changes in Excel dhardman Excel Discussion (Misc queries) 0 November 28th 07 05:11 PM
Excel Macro Save CSV Cell without Prompting [email protected] Excel Discussion (Misc queries) 1 November 16th 06 03:59 PM
File closes without prompting to save freyabeads Excel Discussion (Misc queries) 0 March 1st 06 01:00 PM
calculation - prompting to save when file closes lpj Excel Discussion (Misc queries) 0 February 14th 06 08:27 PM
Excel not prompting to save Add-ins R Avery Excel Programming 1 January 29th 04 06:42 PM


All times are GMT +1. The time now is 04:31 PM.

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"