Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default remove Worksheet using Sh.Delete without prompt

Can I remove a worksheet using a VBA function:
For example:

Sheet1.Delete

WITHOUT PROMPTING the user with this message:
"Data may exist in the sheet(s) selected for deletion. to permanently delete
the data, press Delete. "

Thanks

Coco
ps. I know that this Sheet1 has data. Moreover, it is not important in this
case.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default remove Worksheet using Sh.Delete without prompt

Hi Coco,

coco wrote:
Can I remove a worksheet using a VBA function:
For example:

Sheet1.Delete

WITHOUT PROMPTING the user with this message:
"Data may exist in the sheet(s) selected for deletion. to permanently
delete the data, press Delete. "


You can use the DisplayAlerts property:

Application.DisplayAlerts=False
Sheet1.Delete
Application.DisplayAlerts=True

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default remove Worksheet using Sh.Delete without prompt

One way:

Application.DisplayAlerts = False
Sheet1.Delete
Application.DisplayAlerts = True


In article ,
"coco" wrote:

Can I remove a worksheet using a VBA function:
For example:

Sheet1.Delete

WITHOUT PROMPTING the user with this message:
"Data may exist in the sheet(s) selected for deletion. to permanently delete
the data, press Delete. "

Thanks

Coco
ps. I know that this Sheet1 has data. Moreover, it is not important in this
case.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default remove Worksheet using Sh.Delete without prompt

It works!!!

Thanks you
Coco


"JE McGimpsey" wrote:

One way:

Application.DisplayAlerts = False
Sheet1.Delete
Application.DisplayAlerts = True


In article ,
"coco" wrote:

Can I remove a worksheet using a VBA function:
For example:

Sheet1.Delete

WITHOUT PROMPTING the user with this message:
"Data may exist in the sheet(s) selected for deletion. to permanently delete
the data, press Delete. "

Thanks

Coco
ps. I know that this Sheet1 has data. Moreover, it is not important in this
case.


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 to remove a query prompt in Excel 2003 Frustrated Excel Discussion (Misc queries) 1 November 2nd 05 05:21 PM
How do I delete or remove additional blank pages of a worksheet? Kim Excel Worksheet Functions 1 October 27th 05 08:16 PM
Remove read only prompt macsaintly Excel Discussion (Misc queries) 3 September 2nd 05 05:49 AM
remove enable macro prompt Redden Excel Discussion (Misc queries) 1 August 17th 05 12:16 PM
Delete sheet without prompt chad Excel Programming 3 June 3rd 04 09:26 PM


All times are GMT +1. The time now is 12:10 AM.

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"