PDA

View Full Version : Difference between Sheet and Worksheet



chamster
09-16-2007, 10:39 PM
I've been googling and at
http://64.233.183.104/search?q=cache:clo4HqhCkJ8J:puremis.net/excel/code/058.shtml+excel+vba+%22difference+between%22+sheet+worksheet&hl=sv&ct=clnk&cd=1&gl=se
i've found the info that:

sheets stands for only worksheets object.
worksheets standas for worksheets object but also Dialogue sheets object and Chart sheet object are included.
Example
If you have a workbook as follows,
MsgBox Sheets(1).Name returns "Chart1"
MsgBox Worksheets(1).Name returns "Sheet1".

Now, am i confused or something? First, it's stated that sheets are the less general, only regarding actual worksheets and nothing more. Then, the example states that the name of the first SHEET implies it's a chart. What do i miss here? Is it simply a typo/mistake on that site?

johnske
09-16-2007, 11:16 PM
in short,

Sheets is the general term, and includes all kinds of sheet objects including worksheets, chartsheets etc.

Worksheets is the more specific (i.e. less general) term that's commonly used to refer only to the worksheet object :)

chamster
09-17-2007, 03:19 AM
Got it. Thank you.