+ Reply to Thread
Results 1 to 15 of 15

Can't edit ElseIf statement??

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

    Can't edit ElseIf statement??

    Hi All,

    I have an ElseIf statement but cannot assign a secondary Else quality?

    Please Login or Register  to view this content.
    I basically want to add the condition if the above is not met then do nothing. Something like:

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Can't edit ElseIf statement??

    stagger like this

    Please Login or Register  to view this content.
    Please do add reputation where you see fit, it's nice to be nice and we all enjoy a pat on the back

    Please also mark your thread as solved once it has been.

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't edit ElseIf statement??

    Simply
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

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

    Re: Can't edit ElseIf statement??

    Get a problem with this.
    Attached Images Attached Images

  5. #5
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't edit ElseIf statement??

    Yes, you have. I can see three End Ifs and not a single If statement.

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

    Re: Can't edit ElseIf statement??

    Here it is in context, I just need it to switch off the warning: Driving me nuts<

    Please Login or Register  to view this content.

  7. #7
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't edit ElseIf statement??

    You seem to be testing the same things repeatedly, which serves no purpose. Also, you do the same thing twice to Textbox14. Perhaps this
    Please Login or Register  to view this content.

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

    Re: Can't edit ElseIf statement??

    Thanks, I'll give it a whirl. I do tend to test things more than once but I'm getting better at streamlining, Thank you

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

    Re: Can't edit ElseIf statement??

    I'll pick this up in the morning, cheers

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

    Re: Can't edit ElseIf statement??

    The code is much clearer thank you very much. However, I've got one error message that won't clear when it should. Can I upload an example, its too complex to explain.

  11. #11
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't edit ElseIf statement??

    I think you'll have to.

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

    Re: Can't edit ElseIf statement??

    Ok I'll send through now with a short description, thanks

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

    Re: Can't edit ElseIf statement??

    Ok, here's some guidance:

    Select = AXEGEN (this will open the userform)

    From the drop down menu, complete the following detail:

    CAPACITY = 1500KG
    HUB = X
    STUD/P.C.D. = 4/100
    BRAKE TYPE = AUTO REVERSE
    DROP ARM CENTRES = 127
    OHF = 1375 (this has to entered manually)

    At this point, TextBox14 will carry the message: "ERROR - INNER MEMBER COLLISION SEE TECHNICAL".

    This basically means that the combined inner member length (which becomes inserted into the beam length) have collided in the middle.
    The technical details in the bottom left corner show the length: 570 x 2 = 1140, 1140 - 62 = 1078mm
    This 1078mm is higher than the beam length, at the top of 1064mm, hence the warning.

    Now, we need to override this select a shorter inner member.

    Select = INNER MEMBER L/H
    Select = IMEM006

    At this point another message will appear but ignore it

    The combined inner member length is now 505mm (505 x 2 = 1064) - 1064 - 62 = 948

    948 is well below the top beam length oc 1064mm.

    Thus, the message in ComboBox14 should disappear as there is no longer a collision.

    Hope this makes sense :-/
    Attached Files Attached Files

  14. #14
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't edit ElseIf statement??

    I can't look at the file for the moment, but logically, you don't have anything to clear the warning box if Textbox7 is longer than three characters and none of your conditions are met. Perhaps you just need an Else clause
    Please Login or Register  to view this content.

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

    Re: Can't edit ElseIf statement??

    Ha! Ha!, thats's it! Thank you very much, your a genius!!

+ 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 ElseIf Else Statement not working
    By lazyserv in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-28-2015, 03:38 AM
  2. Adding CountIf Statement within If/ElseIf Statement
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2014, 05:09 AM
  3. [SOLVED] If...Then...ElseIf statement
    By BrownBoy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2014, 05:19 PM
  4. Code stepping in to elseif statement when elseif is definitely not true
    By DFrank231 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-13-2013, 05:31 PM
  5. If then elseif statement
    By Mac10 in forum Excel General
    Replies: 3
    Last Post: 10-02-2010, 09:29 PM
  6. If then elseif statement help needed
    By Mac10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2010, 07:50 PM
  7. ElseIf Statement problem
    By Erik K via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-23-2005, 08:55 AM

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