Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want my macro to save a workbook called "accounts.xls", however I
may already have run the macro in which case I wish to over-write the existing workbook. If the file has already been saved under that name, the following Excel dialogue box appears: "do you wish to over-write the existing file?" in which I have to click "YES" I want the macro to find out whether a file called "accounts.xls" already exists and, if so, delete it, so that the macro can save it without the need for this Excel prompt box to appear. Any ideas? Thanks. Ian M |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ian, try this it will not ask you if you want to over-write it will just do
it Application.DisplayAlerts = False 'Your Code Application.DisplayAlerts = True -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 97 ** remove news from my email address to reply by email ** "Ian M" wrote in message m... I want my macro to save a workbook called "accounts.xls", however I may already have run the macro in which case I wish to over-write the existing workbook. If the file has already been saved under that name, the following Excel dialogue box appears: "do you wish to over-write the existing file?" in which I have to click "YES" I want the macro to find out whether a file called "accounts.xls" already exists and, if so, delete it, so that the macro can save it without the need for this Excel prompt box to appear. Any ideas? Thanks. Ian M |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Paul
It works perfectly. Many thanks for your help. Kind regards Ian M *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
When opening existing doc why do I have to click twice to open? | Excel Discussion (Misc queries) | |||
No Save Prompt dialog box when existing (V2003) | Excel Discussion (Misc queries) | |||
Overwriting most of a workbook | Excel Discussion (Misc queries) | |||
Overwriting an existing Excel workbook | Excel Discussion (Misc queries) | |||
Write over existing file with no Prompt | Excel Programming |