Results 1 to 3 of 3

Check for default values, Prompt for default values, Double click change default valu

Threaded View

  1. #1
    Registered User
    Join Date
    09-19-2008
    Location
    eastern mass
    Posts
    7

    Check for default values, Prompt for default values, Double click change default valu

    I have a Userform with 7 TextBoxes, TextBox1, TextBox2a, TextBox2b, TextBox3a, TextBox3b, TextBox4a, and TextBox4b.

    As the Userform opens I would like it to check if all 7 TextBoxes have a value. The corresponding cells are in a worksheet named “Income 1 Data” and are as follows:

    TextBox1 = Cell A2 and has a Text value
    TextBox2a = Cell C2 and has a Number value
    TextBox2b = Cell G2 and has a Percentage value
    TextBox3a = Cell D2 and has a Number value
    TextBox3b = Cell H2 and has a Percentage value
    TextBox4a = Cell E2 and has a Number value
    TextBox4b = Cell I2 and has a Percentage value
    If any (one or more) of the cells have not been assigned a value I would like a prompt to appear stating “Not all default values have not been declared. Do you want to set default values?”

    If yes, Userform to input values, if no, then cancel default values and accept user input from main Userform. I think it would be too complicated to state which defaults have not been declared unless it is possible to sate it within the MessageBox. For example if Cell A2 and C2 have not been assigned a value: “Taxable Marital Status, Federal Exemption default values have not been declared. Do you want to set default values?”

    If the user chooses to ignore the Message by canceling it, then have the tab stop set to TextBox1 then the next, Etc. If all the required cells have values then tab to the next TextBox in the Userform (TextBox5).

    If a user wishes to change the default value by way of the Userform through a Doubleclik event in the corresponding TextBox let it be so, but upon closure of the Userform have a MessageBox appear stating “Some default values have been changed. Do you want to save changes (Yes, No). Again I think it would be too complicated to declare which values have been changed.

    I can’t seem to get my head around the required looping and conditioning. I can really use some help with this.

    Thanks
    Last edited by VBA Noob; 11-17-2008 at 05:52 PM.

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