Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default prevent saveAs dialog

How can I execute saveAs without getting a dialog box asking if it is ok to
overwrite the file? I am trying to save in a specific format and if I
undertand correctly, the "FileFormat" parameter is not available for a
straight save.

Thanks,

Keith


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default prevent saveAs dialog

Keith,

There are two ways to do this. The first way is to Kill the file
and then do a Save As. E.g.,

On Error Resume Next
Kill "H:\Book2.xls"
On Error GoTo 0
ThisWorkbook.SaveAs Filename:="H:\book2.xls"

Or, you can turn off alerts, do the save, then turn alerts back
on.

Application.DisplayAlerts = False
ThisWorkbook.SaveAs Filename:="H:\Book2.xls"
Application.DisplayAlerts = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"keithb" wrote in message
...
How can I execute saveAs without getting a dialog box asking if
it is ok to overwrite the file? I am trying to save in a
specific format and if I undertand correctly, the "FileFormat"
parameter is not available for a straight save.

Thanks,

Keith



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
SaveAs dialog Gary''s Student Excel Discussion (Misc queries) 2 February 23rd 06 03:11 PM
SaveAs Dialog box Daniel Bonallack Excel Programming 2 April 1st 05 09:25 AM
Supress SaveAs dialog box? Ed Excel Programming 4 March 11th 05 02:20 AM
Disable Saveas Dialog Tom Ogilvy Excel Programming 0 September 15th 04 05:41 PM
Saveas Dialog Box Tom Ogilvy Excel Programming 0 September 15th 04 04:57 PM


All times are GMT +1. The time now is 08:14 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"