Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Programming (https://www.askmehelpdesk.com/forumdisplay.php?f=437)
-   -   Ask visual basic doubt (https://www.askmehelpdesk.com/showthread.php?t=660868)

  • May 16, 2012, 02:00 PM
    1903raj
    ask visual basic doubt
    Hi,

    In my program, I have two forms the first form has a text box and a button and the second form has 5 textbox.

    What I am trying to do is if the user input 1 the form 2 should show one text box . If use user input is 2 then show 2 textbox in form and if input is 3 then form 2 should have 3 textbox.

    The code which I have written is

    Public Sub Command1_Click()


    Dim I As Integer
    If (Val(Text1) >= 1 And Val(Text1) < 3) Then
    For I = 0 To (Val(Text1.Text) - 1)
    Print I
    Form2.Text1(I).Visible = True

    Next
    Form2.Show
    End If


    End Sub

  • All times are GMT -7. The time now is 02:39 PM.