Sheets or Worksheets

  • Thread starter Thread starter Piranha
  • Start date Start date
P

Piranha

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
 
The Worksheets collection contains only worksheets. The Sheets
collection contains worksheets and chart sheets.
 
JE McGimpsey,
Thank you very much. That clears up that question for me.
All i can get to help me understand, is a good thing.
Thanks again
Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Auto footers on multiple pages 5
Inconsistent macro behavior 2
DisplayHeadings 2
variable not set error? 4
FOR EACH statement 17
Autofilter (on/off) 1
For Each Next 6
exclusion list in code 2

Back
Top