Results 1 to 2 of 2

Thread: Number Range in a Combo Box

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    3

    Question

    I am working on a program right now and I was wondering how to place a range of numbers into a dropdown combo box. I need to have the numbers 1 through 100 in one box. There must be some easier way rather than typing Combo.AddItem "1" all the way to 100. Any help would be appreciated.

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    Use a for loop

    Code:
    Dim i As Integer
    
    For i = 1 to 100
      Combo.AddItem Str(i)
    Next i
    Iain, thats with an i by the way!

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