This program is a program in which the user inputs a number into a Text Box and clicks a Button resulting in that number to appear in stars (*) in a List Box, for example.....
User Inputs 5......List Box will display this
*
**
***
****
*****
My Question is, Im using VB 2010 and " List1.AddItem String$(J,"*") " is not the correct syntax, so what is? Can anybody help me? Thanks! :wave:
Dim I As Integer
Dim J As Integer
If IsNumeric(Text1.Text) Then
I = CInt(Text1.Text)
End If
For J= 1 To I
List1.AddItem String$(J,"*")
Next J
User Inputs 5......List Box will display this
*
**
***
****
*****
My Question is, Im using VB 2010 and " List1.AddItem String$(J,"*") " is not the correct syntax, so what is? Can anybody help me? Thanks! :wave:
Dim I As Integer
Dim J As Integer
If IsNumeric(Text1.Text) Then
I = CInt(Text1.Text)
End If
For J= 1 To I
List1.AddItem String$(J,"*")
Next J