+ Reply to Thread
Results 1 to 7 of 7

If then else statement for a combo box

  1. #1
    Forum Contributor
    Join Date
    03-28-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2010
    Posts
    166

    If then else statement for a combo box

    Can someone take a look at this code attached

    I added a combo box called (combobox2) for the user to be able to choose either Tops or Bottoms for a uniform issue or return. The code works as long as tops are selected, but will crap out on bottoms and I changed the cell reference(in Red) in the code to the bottoms area of the worksheet and it did not work. Why?

    Here is the code and I will attach the worksheet as well. Any help will be appreciated.

    Thanks,

    LeapingLizards
    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: If then else statement for a combo box

    You have it wrapped in an if statement here:
    Please Login or Register  to view this content.
    It shouldn't do anything if the value is not "Tops".
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Contributor
    Join Date
    03-28-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2010
    Posts
    166

    Re: If then else statement for a combo box

    If I change the code to read Bottoms it will not work. Thanks Solus! If you test it out it will not work??? Suggestions?

    Thanks,

    LeapingLizards

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: If then else statement for a combo box

    maybe?
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    03-28-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2010
    Posts
    166

    Re: If then else statement for a combo box

    Will give it try. Thanks Solus! Enjoy your holiday. I will repost if it fails to work thank you!

    LeapingLizards

  6. #6
    Forum Contributor
    Join Date
    03-28-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2010
    Posts
    166

    Re: If then else statement for a combo box

    Works Awesome! Nicely done! Enjoy your Holiday Solus!

  7. #7
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: If then else statement for a combo box

    Glad to help. You too!

+ 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. If statement to change Combo box's Row-source?
    By subbby in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-28-2012, 10:10 AM
  2. If statement for a combo box
    By Amber_D_Laws in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-08-2006, 06:26 PM
  3. IF Statement for Combo Box List
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-22-2005, 10:05 AM
  4. Replies: 0
    Last Post: 09-21-2005, 05:05 PM
  5. Replies: 0
    Last Post: 02-15-2005, 06:45 PM

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