Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Deleting sheets removing/turning off the xl prompt

Hello

I'm building a macro which involves creating some new
worksheets, performing calcs in them, then deleting the
rough working worksheets before saving the amended file,
using the following code:

Sheets("working").Select
ActiveWindow.SelectedSheets.Delete


unfortunately this means that I have to keep an eye on the
computer while running the macro, as the prompt for
deleting the sheets comes up everytime. Very annoying when
the macro takes about 10 minutes to work on each file.

One alternative solution would be to move the rough
working sheets to another file and then kill that file,
but this seems a bit contrived. Is there a cleverer way of
getting around this problem, such as a command to turn off
the automatic prompt, or a different way of deleting the
sheet which won't require any manual input?

Cheers
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Deleting sheets removing/turning off the xl prompt

Hi
try the following
application.DisplayAlerts = False
Sheets("working").Select
ActiveWindow.SelectedSheets.Delete
application.DisplayAlerts=True


--
Regards
Frank Kabel
Frankfurt, Germany

EMMA wrote:
Hello

I'm building a macro which involves creating some new
worksheets, performing calcs in them, then deleting the
rough working worksheets before saving the amended file,
using the following code:

Sheets("working").Select
ActiveWindow.SelectedSheets.Delete


unfortunately this means that I have to keep an eye on the
computer while running the macro, as the prompt for
deleting the sheets comes up everytime. Very annoying when
the macro takes about 10 minutes to work on each file.

One alternative solution would be to move the rough
working sheets to another file and then kill that file,
but this seems a bit contrived. Is there a cleverer way of
getting around this problem, such as a command to turn off
the automatic prompt, or a different way of deleting the
sheet which won't require any manual input?

Cheers

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 253
Default Deleting sheets removing/turning off the xl prompt

Hi
As follows :
application.DisplayAlerts=False
Sheets("working").delete 'don't need to select the sheet before
application.DisplayAlerts=True

Regards,
Jean-Yves


"EMMA" . com wrote in
message ...
Hello

I'm building a macro which involves creating some new
worksheets, performing calcs in them, then deleting the
rough working worksheets before saving the amended file,
using the following code:

Sheets("working").Select
ActiveWindow.SelectedSheets.Delete


unfortunately this means that I have to keep an eye on the
computer while running the macro, as the prompt for
deleting the sheets comes up everytime. Very annoying when
the macro takes about 10 minutes to work on each file.

One alternative solution would be to move the rough
working sheets to another file and then kill that file,
but this seems a bit contrived. Is there a cleverer way of
getting around this problem, such as a command to turn off
the automatic prompt, or a different way of deleting the
sheet which won't require any manual input?

Cheers



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
Turning off prompt to save file with no changes opieandy Excel Discussion (Misc queries) 5 May 23rd 07 10:51 PM
Deleting or 'turning off' a list Brent Excel Discussion (Misc queries) 2 October 2nd 06 11:14 PM
Prompt before deleting worksheets? cbrooks421 Excel Discussion (Misc queries) 2 July 20th 05 05:32 AM
Hyperlinks - Turning off (Removing) RWN Setting up and Configuration of Excel 7 February 22nd 05 06:08 AM
Deleting a Prompt Message LC[_2_] Excel Programming 2 July 18th 03 09:46 PM


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