Results 1 to 2 of 2

Thread: I need help with sending information from a text box on one form to another form

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    1

    Angry

    ok, i am trying to build an html editor for a senior project at school, the problem is that i have form where you enter the location of where a pic is or background image is, but the problem is, i can not get it to send the info from one form to another, here is the code



    Private Sub Command1_Click()
    frmBody.Show 1
    If BgType = 1 Then
    If Background_Type$ = "Color" Then
    Text1.Text = Text1.Text + vbNewLine & "<BODY BGCOLOR=""" & Background_Color$ & """ > """
    Else
    Text1.Text = Text1.Text + "<BODY BACKGROUND="""
    End If
    BgType = 0
    Else
    BgType = 0
    End If
    End Sub






    Private Sub Combo1_Change()
    If Combo1.Enabled = True Then
    Background_Type$ = "Color"
    If Combo1.ItemData = 1 Then Background_Color$ = "Red"
    End If
    If Combo1.ItemData = 2 Then Background_Color$ = "Orange"
    End If
    If Combo1.ItemData = 3 Then Background_Color$ = "Yellow"
    End If
    If Combo1.ItemData = 4 Then Background_Color$ = "Green"
    End If
    If Combo1.ItemData = 5 Then Background_Color$ = "Blue"
    End If
    If Combo1.ItemData = 6 Then Background_Color$ = "Purple"
    End If
    If Combo1.ItemData = 7 Then Background_Color$ = "Black"
    End If
    If Combo1.ItemData = 8 Then Background_Color$ = "Brown"
    End If
    If Combo1.ItemData = 9 Then Background_Color$ = "White"
    End If
    End If
    End Sub

    Private Sub Command1_Click()
    BgType = 1
    Unload frmBody
    End Sub

    Private Sub Command2_Click()
    BgType = 0
    Unload frmBody
    End Sub

    Private Sub Option1_Click()
    Combo1.Enabled = False
    Text1.Enabled = True
    End Sub

    Private Sub Option2_Click()
    Text1.Enabled = False
    Combo1.Enabled = True
    End Sub





    Public BgType As Integer
    Public Background_Image_Source$
    Public Background_Type$
    Public Background_Color$






    Please help me, this is driveing me insane!!!!!



  2. #2
    Lively Member
    Join Date
    Sep 2000
    Posts
    113
    i did not read the code but to send txt from one form to another you can.

    (form1)
    lablea="1"
    (form2)
    lablea = form1.lablea

    or you can

    (Module1)
    Public txt
    (form1)
    txt = "a"
    (form2)
    lable = txt

    hope this is what you want.

Posting Permissions

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



Click Here to Expand Forum to Full Width