View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Find a Worksheet

Fair enough. I am in the middle of debugging someone elses code that was
toggling application settings it has messed up some computers. I am a little
sensitive / frustrated at the moment. But ain't that always the way...
--
HTH...

Jim Thomlinson


"Bob Phillips" wrote:

Agreed Jim, but the way that I read the request, he seemed to know the sheet
exists.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Jim Thomlinson" wrote in message
...
Not to pick Bob, but if the sheet does not exist then the code will crash
before the alerts get turned back on again and the application will

continue
to not display alerts until Excel if re-booted (I believe that this is one

of
those settings that automatically resets itself when re-booted). Some kind

of
error handling would be a good thing...
--
HTH...

Jim Thomlinson


"Bob Phillips" wrote:

Application.DisplayAlerts = False
Worksheets("sheetname").Delete
Application.DisplayAlerts = True

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Anice" wrote in message
...
Does anyone have a suggestion on how you could find a worksheet in a
written
code. You have the name, and you want the program to find that sheet

and
delete it.

Thank you!