Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Difference between Worksheets. and Sheets. is...?

Hello all,

This question is just to satisfy my curiousity, as I don't (yet) believe it
has a significant impact on my code.

I came across something and I can't seem to find the answer. Everything
I've found mentions 'how' to use the collection, and not 'why' to use it.

If I use Sheets("Sheet1").Select, then the sheet is selected without error.
If I use Worksheets("Sheet1").Select, I get a "Subscript out of range" error
(run-time error 9).

I haven't got the slightest idea why there's a difference. Any ideas?
Appreciate anything you might have (ideas, links, suggestions).

In most of my code, when accessing cell values I use:
Worksheets("Sheet1").Cells(1, 1).Value = "some random string"
This has never been an issue. Never really used ther Sheets

Thanks,
Jay
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Difference between Worksheets. and Sheets. is...?

Sheets include Chart sheets. Worksheets don't.

Hth,
Merjet


  #3   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Difference between Worksheets. and Sheets. is...?

Well I'll be damned, that makes sense.

Thanks!

Jay

"merjet" wrote:

Sheets include Chart sheets. Worksheets don't.

Hth,
Merjet



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
difference of 2 cells from 2 sheets to appear on sheet 3? wzkm123 Excel Worksheet Functions 2 January 29th 10 07:44 PM
What is the difference beyween "Sheets" and WorkSheets" in subrout Jack_Feeman Excel Programming 2 April 29th 05 02:38 PM
sum difference cells on multiple sheets JulieD Excel Worksheet Functions 8 November 10th 04 05:38 AM
Difference between sheets and worksheets? Alan Excel Programming 2 May 15th 04 07:48 PM
Any difference between Sheets Activate and Select? Don Wiss Excel Programming 1 October 28th 03 12:46 AM


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"