View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jake Marx[_3_] Jake Marx[_3_] is offline
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]