CoolDictionary.com Webster Dictionary with PRONUNCIATION and Sound!

What does the sh as Worksheet mean in plain English?

 
 
   

Question: I'm 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


Answer: You are assigning a variable for referencing the sheets in the workbook. You could just as easily say;

For each sht in ThisWorkbook.Worksheets. You can assign whatever you would like. Think of it as a quick way to reference the sheets. Look up variables in the help file.

Yes, the display alerts does what you think it does

Submit Your Own Answer!

Google





 
 
| Home | English Course Questions | English Grammar Questions | Teaching Esl Questions | Esl Exercise Questions | Esl General Questions | Esl How To Questions | Esl Learning Questions | Esl Lessons Questions | Esl Other Languages | Esl Pronounciation Questions | Learning Sign Language Questions | Esl Worksheets Questions | Esl Adult Questions | Esl Beginner Questions | Conversational English Questions | Site Map |