+ Reply to Thread
Results 1 to 8 of 8

a custom collection with code producing analagous worksheets(1) or worksheets("

Hybrid View

  1. #1
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,040

    Re: a custom collection with code producing analagous worksheets(1) or worksheets("

    Hint: worksheets(1) is actually short for worksheets.Item(1) with the Item property being the default property.
    Everyone who confuses correlation and causation ends up dead.

  2. #2
    Forum Contributor
    Join Date
    02-13-2016
    Location
    CT USA
    MS-Off Ver
    office 365 subscription
    Posts
    180

    Re: a custom collection with code producing analagous worksheets(1) or worksheets("

    Thank you Rory.....let me chew on that hint....Thank you for hinting....

  3. #3
    Forum Contributor
    Join Date
    02-13-2016
    Location
    CT USA
    MS-Off Ver
    office 365 subscription
    Posts
    180

    Re: a custom collection with code producing analagous worksheets(1) or worksheets("

    Good Afternoon Rory !

    Thank you for responding.

    I have been on an interesting journey that extended beyond "how" to "what do i want" and "why does my code seem so unclear"


    Due to your hint (thank goodness you used italic font), i began the search. i found chip Pearson's article on Default member of a class as well as other similar articles.

    Before I try coding with the default (as a learning experience), i have a few questions i want to run by you.

    the default code (attribute) is not visible. Hence when things go wrong, i may not understand why. Is this a valid worry from your experience?

    When i look at "worksheets.item(1)" i think , Given a collection (called Worksheets), give me the first item in that collection. That IS clear though more chance for error.
    When i look at my code, Floors.Floor(1), i should think, Given a collection (called Floors) give me the first Floor in the collection. Not bad when i hear that explanation.

    So, Rory, tell me what your choice is in programming. Do you use defaults and does their invisibility both you?

    bil

    BUT my example in my code is not as clear. Floors.Floor(1)



    Another interesting thought

+ 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. Replies: 4
    Last Post: 10-30-2015, 01:30 PM
  2. [SOLVED] VBA Macro Code to perform Format>Custom & Number for 100+ Worksheets ?
    By mave27 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-07-2015, 06:58 PM
  3. [SOLVED] For loop through Worksheets collection
    By amphinomos in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-31-2014, 08:23 AM
  4. [SOLVED] Edit the code so that it loops through all worksheets and deletes column with "grand" text
    By rocksan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-13-2012, 02:58 AM
  5. Replies: 1
    Last Post: 06-23-2012, 12:12 PM
  6. Define a collection of worksheets
    By mcinnes01 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-22-2010, 11:34 AM
  7. VBA code to create "variable" worksheets within a workbook
    By Chris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-13-2005, 10:05 PM

Tags for this Thread

Bookmarks

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