Userform

JeremySun

Board Regular
Joined
Jul 1, 2011
Messages
98
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
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,224,013
Messages
6,175,941
Members
452,688
Latest member
Cyb3r_Ang3l

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top