ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Difference between sheets and worksheets? (https://www.excelbanter.com/excel-programming/298423-difference-between-sheets-worksheets.html)

alan

Difference between sheets and worksheets?
 
What's the difference between sheets and worksheets? When
should I use one rather than the other?

The following code implies there's no difference:

Dim ws As Worksheet
Set ws = Sheets(1)
ws.Select
Set ws = Worksheets(2)
ws.Select

Regards,
Alan

Frank Kabel

Difference between sheets and worksheets?
 
Hi
the sheets collection also includes chart pages, Excel4 macro pages,
etc. The worksheets collection only worksheets
So in most cases you won't note a difference

--
Regards
Frank Kabel
Frankfurt, Germany

"Alan" schrieb im Newsbeitrag
...
What's the difference between sheets and worksheets? When
should I use one rather than the other?

The following code implies there's no difference:

Dim ws As Worksheet
Set ws = Sheets(1)
ws.Select
Set ws = Worksheets(2)
ws.Select

Regards,
Alan



No Name

Difference between sheets and worksheets?
 
Thanks Frank.

-----Original Message-----
Hi
the sheets collection also includes chart pages, Excel4

macro pages,
etc. The worksheets collection only worksheets
So in most cases you won't note a difference

--
Regards
Frank Kabel
Frankfurt, Germany

"Alan" schrieb im

Newsbeitrag
...
What's the difference between sheets and worksheets?

When
should I use one rather than the other?

The following code implies there's no difference:

Dim ws As Worksheet
Set ws = Sheets(1)
ws.Select
Set ws = Worksheets(2)
ws.Select

Regards,
Alan


.



All times are GMT +1. The time now is 09:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com