Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Suppress error message with saveas

In one particular section of my module, I'd like to perform a
workbook.saveas that will:

1.) suppress the "file already exists" error message (I can do that
with OnError..) 2.) always go ahead and save over the existing file
(how?)

(I saw someone had asked about a related situation, using On Error
GoTo 0 to move on to the next task instead of overwriting the existing
file...close but doesn't quite get me there) Help?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default Suppress error message with saveas

Maybe this:

Application.AlertBeforeOverwriting = False
Application.AlertBeforeOverwriting = True

HTH,
Paul

wrote in message
ups.com...
In one particular section of my module, I'd like to perform a
workbook.saveas that will:

1.) suppress the "file already exists" error message (I can do that
with OnError..) 2.) always go ahead and save over the existing file
(how?)

(I saw someone had asked about a related situation, using On Error
GoTo 0 to move on to the next task instead of overwriting the existing
file...close but doesn't quite get me there) Help?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Suppress error message with saveas

Hi,

Try it this way

Application.DisplayAlerts = False
ThisWorkbook.SaveAs "C:\sample.xls"
Application.DisplayAlerts = True



--
Hope that helps.

Vergel Adriano


" wrote:

In one particular section of my module, I'd like to perform a
workbook.saveas that will:

1.) suppress the "file already exists" error message (I can do that
with OnError..) 2.) always go ahead and save over the existing file
(how?)

(I saw someone had asked about a related situation, using On Error
GoTo 0 to move on to the next task instead of overwriting the existing
file...close but doesn't quite get me there) Help?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Suppress error message with saveas

Thank you, thank you, and thank you!

On May 4, 9:53 am, Dave Peterson wrote:
You can use something like:

Application.displayalerts = false
'your code to save the workbook here
application.displayalerts = true

to suppress that warning dialog.

wrote:

In one particular section of my module, I'd like to perform a
workbook.saveas that will:


1.) suppress the "file already exists" error message (I can do that
with OnError..) 2.) always go ahead and save over the existing file
(how?)


(I saw someone had asked about a related situation, using On Error
GoTo 0 to move on to the next task instead of overwriting the existing
file...close but doesn't quite get me there) Help?


--

Dave Peterson





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 wk3 file type error message Ken Warthen[_2_] Excel Discussion (Misc queries) 1 December 9th 09 10:42 PM
suppress Excel save message Ben Excel Programming 2 October 29th 05 03:54 PM
error message with saveas DJA Excel Discussion (Misc queries) 6 February 17th 05 06:03 PM
Suppress add-in confirmation message Microsoft NewsGroups Excel Programming 2 July 7th 04 06:39 PM
suppress popup message walt Excel Programming 4 August 6th 03 05:33 PM


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