+ Reply to Thread
Results 1 to 4 of 4

Can't Seem to identify an 'If'' failure

  1. #1
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Can't Seem to identify an 'If'' failure

    Hi All,

    I have a slight problem. I have the code:

    Please Login or Register  to view this content.
    I have the first part to populate Textbox 1 with 'AUA' if the value is lower than 900. However, if the figure is between 900 and 1550 I cannot get TextBox 1 to display AUB.
    Last edited by bralew; 07-26-2017 at 09:30 AM. Reason: breach of forum rules

  2. #2
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Can't Seem to identify an 'If'' failure

    Thread has been edited to conform to forum rules

  3. #3
    Valued Forum Contributor
    Join Date
    03-16-2017
    Location
    UK
    MS-Off Ver
    2016
    Posts
    371

    Re: Can't Seem to identify an 'If'' failure

    You have got your inequalities mixed round, should be
    Please Login or Register  to view this content.

    May I suggest that you put your combo box value on the same side of the inequality each time. So change your 900 bits to
    Please Login or Register  to view this content.
    Good practice to have your variable first, then constant.



    Edit: Additionally SELECT CASE would be suitable here since you are testing the same variable for different cases (NB: it tests the cases in the order they appear)
    Please Login or Register  to view this content.
    Last edited by Stormin'; 07-26-2017 at 09:39 AM.

  4. #4
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Can't Seem to identify an 'If'' failure

    Its Ok, I've fixed it :-)

+ 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] Excel Macro - Copy & Paste (Font) problem & Delete Last Added Rows problem
    By LennartB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2015, 06:58 AM
  2. Update Values problem and a Value Selection Problem----Please Help.
    By TrivialT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2013, 02:43 PM
  3. Replies: 6
    Last Post: 10-20-2013, 07:16 PM
  4. input box problem, cell filtering problem, result display while locking sheet
    By croozin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2013, 08:52 AM
  5. Replies: 6
    Last Post: 05-28-2013, 05:08 PM
  6. Replies: 2
    Last Post: 01-22-2013, 07:09 AM
  7. [SOLVED] Started out as an Access problem. Now an Excel problem
    By RobertM in forum Excel General
    Replies: 2
    Last Post: 04-26-2006, 02:35 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