-
Is there any way to create a form with more than one input field( three text boxes for example) and have another form refrence it for input, similar to the InputBox() function, but creating your own input box.
Mainly, I would like the program to pause until it gets the desired input from the custom inputbox, exactly like an InputBox() function but with your own custom forms.
Any help would be appreciated.
-
is this what you want:
Code:
'put on form 1
Private Sub cmdNextForm_Click()
form2.visible = true
form1.visible = false
End Sub
Code:
'put on form 2
Private Sub cmdInput_click()
label1.caption = form1.text1.text
label2.caption = form1.text2.text
label3.caption = form1.text3.text
End Sub
what happens is first it loads form 1, then there are 3 text boxes on it, a user enters information into them then clicks the button. The button opens the other form and when you click on the button on that form, the labels on that form say what the 3 textboxes say on the other form
-
Is this what you want?
Code:
Private Sub Command1_Click()
If Text1 = "MyText" Then Unload Me
End Sub
-
the code that you put there requires that the sending form not be processing any instructions at the time of visibility change.
but I was talking about something like the inputbox where you could type as code
XString = inputbox("Type your name here")
where it would pause the processing code and wait for the input before proceeding. Ex...
private sub loop1()
code
code
code
XString = CustomInput
code
code
code
end sub