Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Whats the difference

Whats the difference between using

Sheets

or

Worksheets

Example


Sheets("Sheet1").Range("D2").Copy

and


WorkSheets("Sheets1").Range("D2").Copy

They both seem to do the same thing. So is there any difference in using
them?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Whats the difference

Worksheets are a specific type of sheet, that are used for capturing and
manipulating data using functions and formulas. Sheets includes Worksheets,
Chart Sheets, Dialog sheets, macro sheets, etc.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Pete" wrote in message
...
Whats the difference between using

Sheets

or

Worksheets

Example


Sheets("Sheet1").Range("D2").Copy

and


WorkSheets("Sheets1").Range("D2").Copy

They both seem to do the same thing. So is there any difference in using
them?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default Whats the difference

Hi Pete,
If sheets1 were sheet1 instead there would be no difference
to you.

The Sheets collection includes Worksheets, and Charts. Prior to Excel 97 macros were in Macro sheets.

What you would have to watch out for is cycling through on a count
of items in a collection, you have be consistent with what you are
working with.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Pete" wrote in message ...
Whats the difference between using

Sheets

or

Worksheets

Example


Sheets("Sheet1").Range("D2").Copy

and


WorkSheets("Sheets1").Range("D2").Copy

They both seem to do the same thing. So is there any difference in using
them?





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
whats it do Curt Excel Discussion (Misc queries) 14 April 13th 07 07:53 PM
Whats the best way to... Azrael Excel Worksheet Functions 0 August 18th 05 05:33 AM
charting a difference of 2 columns' w/o adding a difference column Wab Charts and Charting in Excel 4 July 27th 05 02:37 AM
I don't get it, Whats going on here? CodeSponge[_2_] Excel Programming 3 February 8th 05 04:19 PM
whats the difference? majikman[_25_] Excel Programming 2 May 21st 04 11:11 PM


All times are GMT +1. The time now is 09:18 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"