View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
sebastienm sebastienm is offline
external usenet poster
 
Posts: 694
Default HELP! Sh as Worksheet

It means you are telling vba you are going to use a variable named Sh in the
code which is of type Worksheet
For the DisplayAlerts, you' re right.

Sebastien

"dee" wrote:

Hi,

I'm a newbie and as having trouble grasping something. I'm running code to
delete all empty sheets in a workbook. The code I have found begins with
Dim sh as Worksheets
For Each sh in ThisWorkbook.Worksheets
If Application.WorksheetFunction.Counta(sh.cells) = 0 Then
application.DisplayAlerts = False
sh.Delete
Application.DisplayAlerts=True
End if
Next

My questions is:

What does the sh as Worksheet mean in plain English?
I assume the Displayalerts means don't show me the confirmation message to
delete sheets

Thanks!

--
Thanks!

Dee