What is the difference between Worksheets and Sheets?

Results 1 to 8 of 8

Thread: What is the difference between Worksheets and Sheets?

  1. #1
    Board Regular
    Join Date
    Aug 2005
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default What is the difference between Worksheets and Sheets?

     
    Are the words Worksheets and Sheets the same thing?

    For example:
    Worksheets("Calc").Range("A1:G1").value=0
    Sheets("Calc").Range("A1:G1").value=0

    Are there any differences or different properties between them? Can they be used synonymously?

  2. #2
    MrExcel MVP Ron Coderre's Avatar
    Join Date
    Jan 2009
    Location
    Boston, Massachusetts
    Posts
    2,072
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: What is the difference between Worksheets and Sheets?

    The SHEETS object is a parent object for:
    Worksheets
    Chart Sheets

    If a workbook has 3 worksheets and 1 chart sheet, in VBA:
    Sheets.Count will include both types. 4
    Worksheets.Count will include only worksheets. 3

    Does that help?
    Best Regards,

    Ron Coderre
    Microsoft MVP-Excel (Oct 2006 - Sep 2015)
    Using: Excel 2010 & 2013

  3. #3
    Board Regular
    Join Date
    Aug 2005
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: What is the difference between Worksheets and Sheets?

    Awesome Ron, now I understand! Thank you for taking the time to explain it.

  4. #4
    Board Regular
    Join Date
    Nov 2009
    Posts
    115
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: What is the difference between Worksheets and Sheets?

    Quote Originally Posted by Ron Coderre View Post
    The SHEETS object is a parent object for:
    Worksheets
    Chart Sheets
    A parent object for Sheets/Worksheets collection is Workbook.

  5. #5
    Board Regular scottylad2's Avatar
    Join Date
    Feb 2009
    Location
    East Lothian.....near Edinburgh
    Posts
    1,914
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: What is the difference between Worksheets and Sheets?

    Almost 1:30am here......Worksheets.....for me to hide from my boss in the morning!

    Sheets......for me, any minute soon, with a pillow and duvet of course lol

    Deek
    Windows 7 home 64-Bit Edition
    Office 2007 Professional
    Sometimes posting from my I-phone......Appologies for the Typos in avdunce

  6. #6
    MrExcel MVP Ron Coderre's Avatar
    Join Date
    Jan 2009
    Location
    Boston, Massachusetts
    Posts
    2,072
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: What is the difference between Worksheets and Sheets?

    Quote Originally Posted by Chekie View Post
    A parent object for Sheets/Worksheets collection is Workbook.
    True, I used the wrong word...
    Sheets is a collection of Charts and Worksheets.
    Best Regards,

    Ron Coderre
    Microsoft MVP-Excel (Oct 2006 - Sep 2015)
    Using: Excel 2010 & 2013

  7. #7
    MrExcel MVP
    Join Date
    Apr 2006
    Posts
    18,998
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Default Re: What is the difference between Worksheets and Sheets?

    Not really relevant, as you probably will never encounter it.

    Sheets collection contains all types of sheets. Although today we only use 2 types of Sheets, Worksheets and Chart Sheets, there used to be 3 more types of Sheets, like Dialog Sheets or Macro Sheets. You may still have in your company old excel files that use them. In that case if you check the Sheets collection you'll seem them all there.

    In conclusion

    Sheets - collection of the Sheets of all types
    Worksheets - collection of Sheets of type Worksheet
    Charts - collection of Sheets of type Chart Sheet
    Kind regards
    PGC

    To understand recursion, you must understand recursion.

  8. #8
    New Member
    Join Date
    Dec 2010
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: What is the difference between Worksheets and Sheets?

      
    /!\ In VBA you should use Worksheets() instead of Sheets() when referencing a sheet from another sheet in a formula. This solved some issues i had, maybe you need to be specific about the sheet type this way.

    Quote Originally Posted by pgc01 View Post
    Not really relevant, as you probably will never encounter it.

    Sheets collection contains all types of sheets. Although today we only use 2 types of Sheets, Worksheets and Chart Sheets, there used to be 3 more types of Sheets, like Dialog Sheets or Macro Sheets. You may still have in your company old excel files that use them. In that case if you check the Sheets collection you'll seem them all there.

    In conclusion

    Sheets - collection of the Sheets of all types
    Worksheets - collection of Sheets of type Worksheet
    Charts - collection of Sheets of type Chart Sheet

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com