+ Reply to Thread
Results 1 to 2 of 2

text box input and checkbox on user form

  1. #1
    Registered User
    Join Date
    10-24-2005
    Posts
    55

    text box input and checkbox on user form

    Hi guys

    I have a couple of issues that i cannot seem to resolve (be trying for hours now)

    The first is i have a user form that appears with a text box linked to a cell and a checkbox that when true (which also linked to a cell) increase the price

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.
    But i have to tick the checkbox then un-tick it, then tick it again for the above to work once i have gone thru this the sum works fine. I just need it to happen when you first click it?

    I also have a user form with 5 text boxes one is to enter a order number but if the user does not enter a number then another form appears (with a textbox and checkbox which i have called the "Order error form") that tells the user to enter a order number or click the checkbox, to auto put in a number. I can make the “order error form” open when the main form is open. But how do you or if poss have the info from the textbox or when the checkbox is selected (for a auto number) to put this information in to the main form in one of the textboxes
    i.e. “Order error form” opens the user puts in number or clicks checkbox and presses the command button this closes the “Order error form” and the info (number etc) has be entered into one of the textboxes on the main form.

    Many thanks

    Raw

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello raw,

    First, move your CheckBox code from the Change event procedure to the Click event procedure...

    Please Login or Register  to view this content.
    Second , to transfer information from UserForm to another, they both must be running. The easiest way to do this is hide the on that will be updated by the other.

    "Main" UserForm Example:

    <Your code to detect error>
    frmMain.Hide
    frmOrderError.Show
    frmMain.Show

    "Order Error" Example:

    <Click Event code for CheckBox for TextBox on "Order Error"
    frmMain.TextBox1.Text = TextBox1.Value

    You will need to use the names you have assigned to the USerForms , TextBoxes, and CheckBoxes.

    Sincerely,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1