+ Reply to Thread
Results 1 to 3 of 3

a basic question

  1. #1
    Registered User
    Join Date
    MS-Off Ver

    a basic question

    Hi everyone,
    I have a basic question about sheet reference in vba. is there any difference between two codes :

    Please Login or Register  to view this content.
    I always use the first line code to reference to a range(sheets), but I see the the programmers use the second line code in their programs.(worksheets),in any case both work correct and return same value, but which one is principled? should I use Worksheet property instead of Sheets in my programs?

    Thanks in advance.
    Last edited by amir0914; 10-08-2020 at 06:51 AM.

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    Pole in Yorkshire, UK
    MS-Off Ver

    Re: a basic question

    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365

    Re: a basic question

    The Worksheets collection refers only to worksheets. The Sheets collection refers to worksheets and charts.

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional.)
    Trevor Shuttleworth - Excel Aid

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Basic For/Each question
    By zdodson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-10-2013, 05:15 PM
  2. Very Basic Question, I Think.
    By TBarrnes in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-28-2013, 04:57 AM
  3. Help to basic question
    By eaglesnest in forum Excel General
    Replies: 1
    Last Post: 11-10-2009, 03:54 PM
  4. VBA Basic Question
    By JasonHerndon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2007, 12:28 PM
  5. [SOLVED] Basic question
    By plittle in forum Excel General
    Replies: 1
    Last Post: 05-23-2006, 10:55 AM
  6. Really basic question (I'm sure).
    By wetdog in forum Excel General
    Replies: 5
    Last Post: 12-03-2005, 08:15 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1