View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Sheets or Worksheets

The Worksheets collection contains only worksheets. The Sheets
collection contains worksheets and chart sheets.


In article ,
Piranha wrote:

Hi,
They both select all the sheets in a workbbok.
Whats the difference in these two statements?
Why Dim wkSht?
Why Sheets or Worksheets?

For Each Sheet In ActiveWorkbook.Sheets
Sheet.~~~~~~~

or

Dim wkSht As Worksheet
For Each wkSht In ActiveWorkbook.Worksheets
With wkSht

Thank you
Dave