LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Overwriting a file automatically using saveas in a macro

It's always worked for me, too.

But maybe you could just kill the existing name first.

on error resume next
kill myFileNameWithPathHere
on error goto 0
'do your save

The "on error resume next" says to ignore any error if the file doesn't actually
exist.



doesn't apply wrote:

displayalerts does not work with the overwrite msgbox of SaveAs!

----- Frank Kabel wrote: -----

Hi
use
application.displayalerts = false
before your statement and
application.displayalerts = True
after this

-----Original Message-----
I don't see this option in saveas. Is there another way

to avoid the overwite dialog box when overwriting a file
with a macro?
Thanks
.


--

Dave Peterson

 
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
How to run a macro automatically when the file is opened? LunaMoon Excel Discussion (Misc queries) 1 April 24th 10 01:01 AM
insert rows automatically to avoid overwriting Tushar Bhatt Excel Discussion (Misc queries) 0 November 9th 09 11:41 AM
Confused here Prevent Saving File - but allow ONLY File SAVEAS Met JMay Excel Discussion (Misc queries) 2 June 17th 07 04:37 PM
saveas CSV file stevekirk Excel Discussion (Misc queries) 0 August 10th 06 01:11 PM
Automatically run macro when opening file Chris Excel Programming 5 December 23rd 03 02:55 PM


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