Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
TOM TOM is offline
external usenet poster
 
Posts: 47
Default Macro : confirm Delete

Dear,

I am useing this macro :

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

Then a messagebox appears to confirm to delete the data.
How can I klick "Delete" automatically (or avoid this
msgbox)?

Thanks !
Tom
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Macro : confirm Delete

Hi Tom,

Application.DisplayAlerts = False
Sheets("XXX").Select
ActiveWindow.SelectedSheets.Delete
Application.DisplaAlerts = True

as you are only deleting the one sheet it can also be simplified to

Application.DisplayAlerts = False
ActiveWorkbook.Sheets("XXX").Delete
Application.DisplaAlerts = True

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Tom" wrote in message
...
Dear,

I am useing this macro :

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

Then a messagebox appears to confirm to delete the data.
How can I klick "Delete" automatically (or avoid this
msgbox)?

Thanks !
Tom



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Macro : confirm Delete

Thank you !!


-----Original Message-----
Hi Tom,

Application.DisplayAlerts = False
Sheets("XXX").Select
ActiveWindow.SelectedSheets.Delete
Application.DisplaAlerts = True

as you are only deleting the one sheet it can also be

simplified to

Application.DisplayAlerts = False
ActiveWorkbook.Sheets("XXX").Delete
Application.DisplaAlerts = True

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Tom" wrote in

message
...
Dear,

I am useing this macro :

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

Then a messagebox appears to confirm to delete the

data.
How can I klick "Delete" automatically (or avoid this
msgbox)?

Thanks !
Tom



.

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
getting rid of the "confirm delete" dialogue box when deleting a s Bernard Excel Discussion (Misc queries) 5 July 3rd 09 11:49 PM
Confirm a choice before Macro JSnow Excel Discussion (Misc queries) 3 October 9th 08 08:00 PM
How to confirm the open dialogue box by using macro coding? Eric Excel Worksheet Functions 3 June 13th 07 12:54 PM
Confirm Delete Message Disable RiosPapa New Users to Excel 2 October 7th 05 09:02 PM
How do i delete a macro in Excel 2003 when delete isn't highlight Abel Excel Discussion (Misc queries) 2 September 13th 05 04:09 AM


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