Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help with Visual basic

    Can i get the coding for a program which allows the user to enter a number and that number of stars loads up.

  • #2
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy this is how far ive got

    Private Sub cmdstart_Click()
    Dim text1 As Integer
    For text1 = ;text1;
    Form1.Print= "*"
    Next text1
    End Sub

  • #3
    New to the CF scene
    Join Date
    Feb 2003
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    New Coder
    Join Date
    Mar 2003
    Location
    Dallas,TX
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How about this?

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

    or
    Text2.Text = goop$


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •