Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Overwriting an existing Excel workbook

When I "save as" and overwrite an existing workbook I get the prompt "are you
sure you want to overwrite" is there any way to not get that prompt? To just
overwrite without warning?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Overwriting an existing Excel workbook

You mean in your macro?

If yes:

application.displayalerts = false
'your code to do .saveas
application.displayalerts = true

If you mean when you use file|saveas, I don't think so.

Jenni wrote:

When I "save as" and overwrite an existing workbook I get the prompt "are you
sure you want to overwrite" is there any way to not get that prompt? To just
overwrite without warning?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Overwriting an existing Excel workbook

Yes in my macro would be great but if that cannot be done I was hoping there
is a way for me to "turn off" that warning temporarily while I run my macro.

"Dave Peterson" wrote:

You mean in your macro?

If yes:

application.displayalerts = false
'your code to do .saveas
application.displayalerts = true

If you mean when you use file|saveas, I don't think so.

Jenni wrote:

When I "save as" and overwrite an existing workbook I get the prompt "are you
sure you want to overwrite" is there any way to not get that prompt? To just
overwrite without warning?


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Overwriting an existing Excel workbook

Do the "if yes" suggestion.

Jenni wrote:

Yes in my macro would be great but if that cannot be done I was hoping there
is a way for me to "turn off" that warning temporarily while I run my macro.

"Dave Peterson" wrote:

You mean in your macro?

If yes:

application.displayalerts = false
'your code to do .saveas
application.displayalerts = true

If you mean when you use file|saveas, I don't think so.

Jenni wrote:

When I "save as" and overwrite an existing workbook I get the prompt "are you
sure you want to overwrite" is there any way to not get that prompt? To just
overwrite without warning?


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Overwriting an existing Excel workbook

In Excel 2003 you need to set this before calling SaveAs:
DisplayAlerts = False
AlertBeforeOverwriting = False

In this Excel version, DisplayAlerts = False does not suppress the
overwrite warning. To make very sure that you are never prompted, it is
recommended that you also use the ConflictResolution parameter of
SaveAs, like this:

ActiveWorkbook.SaveAs Filename:="name to be used",
FileFormat:=xlNormal, ConflictResolution:=xlLocalSessionChanges

Best regards,

Berend


Dave Peterson schreef:

Do the "if yes" suggestion.

Jenni wrote:

Yes in my macro would be great but if that cannot be done I was hoping there
is a way for me to "turn off" that warning temporarily while I run my macro.

"Dave Peterson" wrote:

You mean in your macro?

If yes:

application.displayalerts = false
'your code to do .saveas
application.displayalerts = true

If you mean when you use file|saveas, I don't think so.

Jenni wrote:

When I "save as" and overwrite an existing workbook I get the prompt "are you
sure you want to overwrite" is there any way to not get that prompt? To just
overwrite without warning?

--

Dave Peterson


--

Dave Peterson




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Overwriting an existing Excel workbook

From xl2003's help for AlertBeforeOverwriting...

True if Microsoft Excel displays a message before overwriting nonblank cells
during a drag-and-drop editing operation. Read/write Boolean.

That's the setting you can toggle via Tools|Options|Edit tab|under the allow
cell drag and drop box.

I've never seen xl2003 show the warning prompt when I've used
"application.displayalerts = false"

And the Conflictresolution setting has to do with shared workbooks. If the
workbook isn't shared, this won't have any effect.

Also from xl2003's help for the ConflictResolution Property:

Returns or sets the way conflicts are to be resolved whenever a shared workbook
is updated. Read/write XlSaveConflictResolution.

XlSaveConflictResolution can be one of these XlSaveConflictResolution constants.
xlLocalSessionChanges. The local user's changes are always accepted.
xlOtherSessionChanges. The local user's changes are always rejected.
xlUserResolution. A dialog box asks the user to resolve the conflict.


wrote:

In Excel 2003 you need to set this before calling SaveAs:
DisplayAlerts = False
AlertBeforeOverwriting = False

In this Excel version, DisplayAlerts = False does not suppress the
overwrite warning. To make very sure that you are never prompted, it is
recommended that you also use the ConflictResolution parameter of
SaveAs, like this:

ActiveWorkbook.SaveAs Filename:="name to be used",
FileFormat:=xlNormal, ConflictResolution:=xlLocalSessionChanges

Best regards,

Berend

Dave Peterson schreef:

Do the "if yes" suggestion.

Jenni wrote:

Yes in my macro would be great but if that cannot be done I was hoping there
is a way for me to "turn off" that warning temporarily while I run my macro.

"Dave Peterson" wrote:

You mean in your macro?

If yes:

application.displayalerts = false
'your code to do .saveas
application.displayalerts = true

If you mean when you use file|saveas, I don't think so.

Jenni wrote:

When I "save as" and overwrite an existing workbook I get the prompt "are you
sure you want to overwrite" is there any way to not get that prompt? To just
overwrite without warning?

--

Dave Peterson


--

Dave Peterson


--

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
Excel 2003 Workbook into Word 2003 B. Levien Excel Discussion (Misc queries) 4 September 26th 06 09:52 PM
enable automatic refresh Vass Excel Worksheet Functions 2 March 11th 06 04:36 AM
excel exits unexpectedly or hangs the second time I open workbook r_m_i Excel Discussion (Misc queries) 0 February 9th 06 10:14 PM
Protect Workbook vs Worksheet?? Dan B Excel Worksheet Functions 3 November 7th 05 09:02 PM
Automate Excel to powerpoint - Graphs along with Datasheet (not workbook) Hari Prasadh Charts and Charting in Excel 4 February 17th 05 02:44 PM


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