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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,216,753
Messages
6,132,514
Members
449,731
Latest member
dasda34

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