Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default _Workbook::SaveAs(...)

Hello NG,

I'm certain somebody already encountered this problem (I am using OLE
Automation with VC++):

If I want to save a workbook or worksheet with "SaveAs", and the target file
already exists, I get a MessageBox "This file already exists. Do you
want...". Of course, in an automated program, I don't want to answer message
boxes, instead I always want to override the existing file.
- I cannot find if one of the many parameters to supply with SaveAs controls
this behavior (I experimented with no success).
- Maybe it is an option which needs to be set correctly?

Thanks for any comments
Fritz


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default _Workbook::SaveAs(...)

I don't do VC++ but in VBA Application.DisplayAlerts = False before the
SaveAs suppresses the warning.

--
Jim
"Fritz Hilgemann" wrote in message
...
| Hello NG,
|
| I'm certain somebody already encountered this problem (I am using OLE
| Automation with VC++):
|
| If I want to save a workbook or worksheet with "SaveAs", and the target
file
| already exists, I get a MessageBox "This file already exists. Do you
| want...". Of course, in an automated program, I don't want to answer
message
| boxes, instead I always want to override the existing file.
| - I cannot find if one of the many parameters to supply with SaveAs
controls
| this behavior (I experimented with no success).
| - Maybe it is an option which needs to be set correctly?
|
| Thanks for any comments
| Fritz
|
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default _Workbook::SaveAs(...)

You can either delete existing file first, or you can set the
Application.DisplayAlerts property to False.


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


"Fritz Hilgemann" wrote in message
...
Hello NG,

I'm certain somebody already encountered this problem (I am
using OLE
Automation with VC++):

If I want to save a workbook or worksheet with "SaveAs", and
the target file
already exists, I get a MessageBox "This file already exists.
Do you
want...". Of course, in an automated program, I don't want to
answer message
boxes, instead I always want to override the existing file.
- I cannot find if one of the many parameters to supply with
SaveAs controls
this behavior (I experimented with no success).
- Maybe it is an option which needs to be set correctly?

Thanks for any comments
Fritz




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 Stan Halls Excel Worksheet Functions 5 November 28th 06 07:51 PM
Help with SaveAs Glen Mettler[_4_] Excel Programming 2 March 4th 05 03:33 PM
Saveas Dale Levesque Excel Programming 6 May 5th 04 04:06 PM
More help with SaveAs Glen Mettler[_2_] Excel Programming 2 February 14th 04 02:50 AM
SaveAs,csv popo pop Excel Programming 2 October 31st 03 06:08 AM


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