+ Reply to Thread
Results 1 to 4 of 4

Naming labels on Input Form problem

  1. #1
    Registered User
    Join Date
    03-25-2004
    Posts
    54

    Naming labels on Input Form problem

    I have an input form with a column of labels that I wish to select in sequence and fill their captions from corrisponding cells on a spreadsheet. The labels are named lblOAK1, lblOAK2, lblOAK3 etc. I have tried to select the correct label with the following code but I can't get it to work:

    Please Login or Register  to view this content.
    What am I doing wrong here?

    Paul

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    What range actually contains the captions?
    Have you any other labels on the form?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

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

    To access an object on a UserForm, you use the object's name as the index in the Controls collection object of the UserForm. See the code in blue below...

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  4. #4
    Registered User
    Join Date
    03-25-2004
    Posts
    54
    Many thanks Leith - using

    Please Login or Register  to view this content.
    worked perfectly - I obviously need to learn about the Controls collection

    Thanks again,

    Paul

+ 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