Click to See Complete Forum and Search --> : Automating number generation in a Combobox


Viji
August 14th, 2001, 10:21 AM
I am trying to populate a combo box with no's 1 to 100. What's the best way of add this text to combo box w/o typing
cmbNo.Additem "1"
cmbNo.Additem "2" etc. till 100. i.e. I want to automate the no. generation

Sorry for my ignoreance but your help is much appreciated.

Polkabora
August 14th, 2001, 10:29 AM
I would use a for next loop as follows:
Str will convert the integer into a string
Dim a as integer
for a = 1 to 100
cmbNo.Additem str(a)
Next a

Viji
August 14th, 2001, 12:03 PM
hi,
Thank you for your help..It works fine..