PC Review


Reply
Thread Tools Rate Thread

Difference between Worksheets. and Sheets. is...?

 
 
=?Utf-8?B?SmF5?=
Guest
Posts: n/a
 
      19th Feb 2007
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
 
Reply With Quote
 
 
 
 
merjet
Guest
Posts: n/a
 
      19th Feb 2007
Sheets include Chart sheets. Worksheets don't.

Hth,
Merjet


 
Reply With Quote
 
=?Utf-8?B?SmF5?=
Guest
Posts: n/a
 
      19th Feb 2007
Well I'll be damned, that makes sense.

Thanks!

Jay

"merjet" wrote:

> Sheets include Chart sheets. Worksheets don't.
>
> Hth,
> Merjet
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing the difference between 2 worksheets teckkee Microsoft Excel Misc 2 3rd Jan 2009 12:07 AM
Compare Rows on different Worksheets and Output Difference's to other Worksheets. dids72@gmail.com Microsoft Excel Programming 3 19th Sep 2007 04:48 PM
What is the difference beyween "Sheets" and WorkSheets" in subrout =?Utf-8?B?SmFja19GZWVtYW4=?= Microsoft Excel Programming 2 29th Apr 2005 02:38 PM
Difference between sheets and worksheets? Alan Microsoft Excel Programming 2 15th May 2004 07:48 PM
Difference between 2 worksheets johnb Microsoft Excel Misc 1 8th Apr 2004 09:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:53 PM.