Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Deleting Sheets - Without a prompt

Anyone know if its possible to switch off prompting for confirmation when a
macro wants to delete a sheet ?

I've tried using sendkeys with " " to click the default button but that
doesn't seem to work.

Thanks, Nick

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Deleting Sheets - Without a prompt

Give this a whirl...

Application.DisplayAlerts = False
Sheets("Sheet1").Delete
Application.DisplayAlerts = true

--
HTH...

Jim Thomlinson


"Nicholas B" wrote:

Anyone know if its possible to switch off prompting for confirmation when a
macro wants to delete a sheet ?

I've tried using sendkeys with " " to click the default button but that
doesn't seem to work.

Thanks, Nick

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Deleting Sheets - Without a prompt

Thanks Jim

How simple !

"Jim Thomlinson" wrote:

Give this a whirl...

Application.DisplayAlerts = False
Sheets("Sheet1").Delete
Application.DisplayAlerts = true

--
HTH...

Jim Thomlinson


"Nicholas B" wrote:

Anyone know if its possible to switch off prompting for confirmation when a
macro wants to delete a sheet ?

I've tried using sendkeys with " " to click the default button but that
doesn't seem to work.

Thanks, Nick

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
How do I make excel not prompt before deleting worksheets? Lar Chen Excel Worksheet Functions 2 July 12th 06 11:27 PM
How to stop file open macro prompt after deleting all macros? twor57 Excel Worksheet Functions 2 November 29th 05 05:00 PM
Prompt before deleting worksheets? cbrooks421 Excel Discussion (Misc queries) 2 July 20th 05 05:32 AM
Deleting sheets removing/turning off the xl prompt EMMA Excel Programming 2 March 2nd 04 11:55 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 09:02 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"