...

View Full Version : help with Visual basic



bx19txd
05-12-2004, 10:10 AM
Can i get the coding for a program which allows the user to enter a number and that number of stars loads up.

bx19txd
05-12-2004, 10:17 AM
Private Sub cmdstart_Click()
Dim text1 As Integer
For text1 = ;text1;
Form1.Print= "*"
Next text1
End Sub

hongjun
05-15-2004, 07:09 PM
try this

Private Sub Command1_Click()
Dim i As Integer

For i = 1 To Text1.Text
Form1.Print "*"
Next
End Sub


OR

Private Sub Command1_Click()
Dim i As Integer
Dim str As String

str = ""
For i = 1 To Text1.Text
str = str & "*"
Next

Form1.Print str
End Sub



hongjun

malform
05-16-2004, 04:06 AM
How about this?

goop$ = String$(val(Text1.Text),"*")
Form1.Print = goop$

or
Text2.Text = goop$



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum