Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatic replacing a file while in a macro


I have a macro that, among other things, saves a worksheet with a
specific name. Everytime the macro is run I get the standard dialog box
"do you want to replace the existing file". I am looking for away to
replace the file without the dialog box popping up, so the user won't
have to interfere.

Thanks in advance,

Jasper Blaas


--
JasperBlaas
------------------------------------------------------------------------
JasperBlaas's Profile: http://www.excelforum.com/member.php...o&userid=12615
View this thread: http://www.excelforum.com/showthread...hreadid=400776

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Automatic replacing a file while in a macro

application.DisplayAlerts = False
' code that causes prompt
Application.displayAlerts = True

this works.
--
Regards,
Tom Ogilvy

"JasperBlaas"
wrote in message
...

I have a macro that, among other things, saves a worksheet with a
specific name. Everytime the macro is run I get the standard dialog box
"do you want to replace the existing file". I am looking for away to
replace the file without the dialog box popping up, so the user won't
have to interfere.

Thanks in advance,

Jasper Blaas


--
JasperBlaas
------------------------------------------------------------------------
JasperBlaas's Profile:

http://www.excelforum.com/member.php...o&userid=12615
View this thread: http://www.excelforum.com/showthread...hreadid=400776



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Automatic replacing a file while in a macro

hi,
Try this. it will turn off the message will saving but be sure you turn
alerts back on.

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs " "filepath\filename""
Application.DisplayAlerts = True

regards
FSt1

"JasperBlaas" wrote:


I have a macro that, among other things, saves a worksheet with a
specific name. Everytime the macro is run I get the standard dialog box
"do you want to replace the existing file". I am looking for away to
replace the file without the dialog box popping up, so the user won't
have to interfere.

Thanks in advance,

Jasper Blaas


--
JasperBlaas
------------------------------------------------------------------------
JasperBlaas's Profile: http://www.excelforum.com/member.php...o&userid=12615
View this thread: http://www.excelforum.com/showthread...hreadid=400776


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
Replacing a password protected file. JEV Excel Discussion (Misc queries) 1 March 26th 09 01:08 PM
Replacing all references to a file, with a new file name. Lots!! phil Excel Worksheet Functions 1 May 10th 07 04:33 PM
Hexadecimal File Replacing excel file E.Q. Excel Discussion (Misc queries) 1 February 24th 07 01:57 PM
Replacing a string within a text file DHallam[_4_] Excel Programming 4 July 20th 05 06:00 AM
Replacing XLS file rather than saving FuzzyDove Excel Programming 3 November 19th 04 08:55 PM


All times are GMT +1. The time now is 03:32 PM.

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

About Us

"It's about Microsoft Excel"