+ Reply to Thread
Results 1 to 3 of 3

'Labels' Control in Excel (Labels Collection)?

  1. #1
    Forum Contributor
    Join Date
    09-23-2007
    Location
    Melbourne, Australia
    Posts
    173

    Red face 'Labels' Control in Excel (Labels Collection)?

    Hi

    I'm not sure how to go about using the Labels control in Excel. I embed several of them in an excel worksheet and want to step through all of them but for some reason excel doesn't seem to recognise a Labels Collection. Is there a Labels Collection?

    Here's what I tried to do.

    First I added 5 Labels to an Excel Worksheet. Label1, Label2...to Label5
    Now I tried to step through them.


    Below I get Runtime error 13 'Type Mismatch'
    Please Login or Register  to view this content.

    I also tried to make an Array of Labels

    For the below I get Runtime error 91 'Object Variable or With Block Variable not set'
    Please Login or Register  to view this content.
    If I place Set before the Lbls(1) I get Runtime error 13 again 'Type Mismatch'

    I beleive this comes down to my fundamental understanding of Labels and how they are reference.. etc.

    Any help on this would be greatly appreciated.

    Thanks so much.
    Danny2000
    Last edited by danny2000; 03-24-2010 at 08:52 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: 'Labels' Control in Excel (Labels Collection)?

    Hello Danny2000,

    There are 2 types of Labels that Excel uses: Forms and Control Toolbox. The macros below are for each type.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    09-23-2007
    Location
    Melbourne, Australia
    Posts
    173

    Re: 'Labels' Control in Excel (Labels Collection)?

    Thanks very much for this Leith. Perfect.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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