Results 1 to 3 of 3

Thread: List box

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2014
    Posts
    18

    List box

    Is there any way to have a list box generate a certain number of items of which the number of items needed to be generated is typed in a text box by the user?

  2. #2
    Hyperactive Member
    Join Date
    Mar 2012
    Posts
    311

    Re: List box

    Use a For loop that iterates the number of times entered in the TextBox, and use ListBox1.Items.Add('whatever) to add the item to the ListBox.

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,989

    Re: List box

    Rather than a textbox, use a NumericUpdown control. That way, the user can't enter non-numbers, which will avoid some errors.
    My usual boring signature: Nothing

Posting Permissions

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



Click Here to Expand Forum to Full Width