Adding the alphabet in a list box or combo list 
Author Message
 Adding the alphabet in a list box or combo list

I have tried for next loops & while loops chr(65) to chr(122), but can not
come up with a workable way to enter the alphabet as a list. I end up with
all kinds of different errors & I'm just to tired to continue.

Any ideas without doing a:
combo1.additem "A"
combo1.additem "B", etc.
?????

David Wier
http://www.*-*-*.com/ ~dwier



Fri, 19 Nov 1999 03:00:00 GMT  
 Adding the alphabet in a list box or combo list

Try:

Dim I as Integer
For I = 65 to 122
   Combo1.AddItem Chr$(I)
Next I



Quote:
> I have tried for next loops & while loops chr(65) to chr(122), but can
not
> come up with a workable way to enter the alphabet as a list. I end up
with
> all kinds of different errors & I'm just to tired to continue.

> Any ideas without doing a:
> combo1.additem "A"
> combo1.additem "B", etc.
> ?????

> David Wier
> http://www.flash.net/~dwier



Sat, 20 Nov 1999 03:00:00 GMT  
 Adding the alphabet in a list box or combo list

Hi David,
Tried the following and it seemed to work
Private Sub Form_Load()
Dim X
For X = 65 To 90
Combo1.AddItem Chr(X)
Next X
Combo1.ListIndex = 0
End Sub
HTH

Quote:

> I have tried for next loops & while loops chr(65) to chr(122), but can not
> come up with a workable way to enter the alphabet as a list. I end up with
> all kinds of different errors & I'm just to tired to continue.

> Any ideas without doing a:
> combo1.additem "A"
> combo1.additem "B", etc.
> ?????

> David Wier
> http://www.flash.net/~dwier



Sun, 21 Nov 1999 03:00:00 GMT  
 Adding the alphabet in a list box or combo list



Quote:
>I have tried for next loops & while loops chr(65) to chr(122), but can not
>come up with a workable way to enter the alphabet as a list. I end up with
>all kinds of different errors & I'm just to tired to continue.

For i = Asc("A") To Asc("Z")
    Combo1.AddItem Chr$(i)
Next i


Sat, 27 Nov 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How to list macro names in a combo box or a list box

2. adding to a combo box or list box

3. If not in combo list, then add to the list

4. Listing all tables or queries in a list/combo box

5. How to list macro names in a combo box or a list

6. How to list macro names in a combo box or a list

7. Rebuild select list for combo/list box

8. Use list from excel or access to populate combo/list box

9. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

10. Updating a combo box list W/limit to list selected

11. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

12. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

 

 
Powered by phpBB® Forum Software