I am trying to get a userform with 20 textboxes to show. Then the user inputs 20 values into the textboxes. Clicks submit. Then the VB will send one value at a time to another program and wait for the vb to complete to send the next value. Below is an example of what I have so far. If it helps...
Code:
Dim LF As String ' Chr(rcLF) = Chr(10) = Control-J
Dim CR As String ' Chr(rcCR) = Chr(13) = Control-M
LF = Chr(Reflection2.ControlCodes.rcLF)
CR = Chr(Reflection2.ControlCodes.rcCR)
With Session
.Transmit "508"
' String omitted because it might change:
' .WaitForString "508", NEVER_TIME_OUT, rcAllowKeystrokes
' Press VtEnter (Simulate pressing the Enter key).
.TransmitTerminalKey rcVtEnterKey
.StatusBar = "Waiting for Prompt: Select 508 MAIN MENU Option:"
.WaitForString LF & "Select ", NEVER_TIME_OUT, rcAllowKeystrokes
.StatusBar = ""
' String omitted because it might change:
' .WaitForString "508", NEVER_TIME_OUT, rcAllowKeystrokes
.StatusBar = "Waiting for Prompt: Select 508 MAIN MENU Option:"
.WaitForString " MAIN MENU Option: ", NEVER_TIME_OUT, rcAllowKeystrokes
.StatusBar = ""
.Transmit "out" & CR
.StatusBar = "Waiting for Prompt: Select Value:"
.WaitForString LF & "Select Value: ", NEVER_TIME_OUT, rcAllowKeystrokes
.StatusBar = ""
UserForm1.show
.Transmit Value & CR 'this is where I need the textbox values to be send.
.StatusBar = "Waiting for Prompt: OK? YES//"
.WaitForString LF & " OK? YES// ", NEVER_TIME_OUT, rcAllowKeystrokes
.StatusBar = ""
.Transmit CR
.StatusBar = "Waiting for Prompt: DEVICE:"
.WaitForString LF & "DEVICE: ", NEVER_TIME_OUT, rcAllowKeystrokes
.StatusBar = ""
.Transmit "slave" & CR
.StatusBar = "Waiting for Prompt: DEVICE: slave Printer Port RIGHT MARGIN: 80//"
.WaitForString "slav Printer Port RIGHT MARGIN: ", NEVER_TIME_OUT, rcAllowKeystrokes
.StatusBar = ""
.StatusBar = "Waiting for Prompt: DEVICE: slave Printer Port RIGHT MARGIN: 80//"
.WaitForString "// ", NEVER_TIME_OUT, rcAllowKeystrokes
.StatusBar = ""
.Transmit CR