Results 1 to 3 of 3
  1. #1
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Loop to populate TextBox (2000+)

    Do I take it from this thread that I can't populate a number of TextBoxes on a form (Ref1, Ref2, Ref3...) in a loop reading from a range of cells?

    Or from a single variable: e.g.
    <code>x = 5 : Refx.Value = Cells(1, x)</code>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Loop to populate TextBox (2000+)

    You could use

    Controls("Ref" & x).Value = Cells(1, x)

  3. #3
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Loop to populate TextBox (2000+)

    Aha! Now we're cooking with free rice!
    Thank you.

Posting Permissions

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