View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 292
Default "Delete" method of a worksheet object

Bonjour Jean-Pierre

Application.DisplayAlerts = False
Worksheets(1).Delete
Application.DisplayAlerts = True

the lowercase d indicates a problem. Maybe a procedure, a variable or a
control is named "delete". If so then rename it, the word has a reserved
special meaning.

HTH. Best wishes Harald

"Jean-Pierre Bidon" skrev i melding
...
Hi,
I'd like to delete a worksheet silently, but Excel asks for a
confirmation, because the sheet is possibly not empty. I tried to clear or
delete its usedrange beforehand, but it doesn't work neither (still asks
for confirmation).
My question: How to bypass this automatic request. By the way, I don't
understand that in the VB editor, "delete", the "d" is written in
lowercase.
Thanks in advance.
--
Jean-Pierre Bidon
Interstat
91 rue de Rennes
75006 Paris
Tél: 01 45 49 19 17