I want to put A to Z in a Combo Box in VB 6, What is the short way except
Combo1.AddItem A
...
...
...
Please help me
Printable View
I want to put A to Z in a Combo Box in VB 6, What is the short way except
Combo1.AddItem A
...
...
...
Please help me
Perhaps this is what you want:
VB Code:
Private Sub Form_Load() Dim i% For i = 65 To 90 Combo1.AddItem Chr(i) Next i End Sub
Thank you
Why we use % in variable
like Dim i%
% ensures that the variable is integer.
its same as saying
Dim i as integer
hmm.. Thanks, if we want to use String Variable the what should we use ?
VB Code:
Dim a$ 'String MsgBox TypeName(a) 'Just to be sure
I've posted this long ago so have a look at it (if interested) - it's an "extended version" of what jcis posted:
VB6's data types and their shortcuts