+ Reply to Thread
Results 1 to 6 of 6

Using the If function to set parameters on Text and Combo boxes on a userform

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    44

    Using the If function to set parameters on Text and Combo boxes on a userform

    I am trying to use the if function on my userform to only allow certain values to be returned from the input of other values on the userform. I also want a message box to appear if certain fields are left blank based upon which data has been entered. Here is my code, but even when I have data input into the "Valve Position" combo box it still tells me "Data needed" Why?

    Here is just an excerpt of my code:
    Please Login or Register  to view this content.
    Any advice?

    Thanks in advance.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Using the If function to set parameters on Text and Combo boxes on a userform

    Separate out this If with the long expression to check each combobox/textbox on it's own.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-21-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Using the If function to set parameters on Text and Combo boxes on a userform

    I'm not sure what you mean by long expression?

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    This is one of them.
    Please Login or Register  to view this content.
    What are you actually trying to check there?

  5. #5
    Registered User
    Join Date
    08-21-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Using the If function to set parameters on Text and Combo boxes on a userform

    I figured it out, I just did them separate like you said and it worked. Thanks

  6. #6
    Registered User
    Join Date
    08-21-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Using the If function to set parameters on Text and Combo boxes on a userform

    I figured it out. Thanks for your reply.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Help with code for userform text boxes, combo boxes and excel
    By innerise in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-20-2014, 09:07 AM
  2. Selected data from combo boxes to text boxes
    By soulun in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-22-2013, 06:48 AM
  3. Auto populating UserForm Combo and Text boxes from Validated data sets
    By ZIXILPLIX in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-04-2010, 12:55 AM
  4. Combo Boxes in UserForm
    By Chris1201 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-14-2010, 05:11 PM
  5. Userform with 2 combo boxes
    By WhiteKelso in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-30-2007, 11:46 AM

Tags for this Thread

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