+ Reply to Thread
Results 1 to 14 of 14

include some error checking code to this code

  1. #1
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    include some error checking code to this code

    Hi all

    I request that some additional code be added to the start of this code.

    Check that "Front sheet" cell "H6" Is blank before displaying anything in
    cell "F6".
    Which is the code below.



    Please Login or Register  to view this content.
    Sample file attached.


    Thank you in advance

    Pete
    Attached Files Attached Files
    One I have learnt over the last few months, " You are NEVER too old to learn ".
    Sometimes I forget to say " Thank You " for your assistance, so here I say " A BIG Thank You. "

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,493

    Re: include some error checking code to this code

    What do you want to happen if H6 isn't blank? Should the cell be cleared?

    The code starts by looking to see if there is something in H6 - won't your request mean that the code will never run?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    Re: include some error checking code to this code

    Ali

    At the moment on your file as soon as you enter a rider's number in D6, F6 comes up
    with " 2nd Leg" even though H6 is still blank.


    I would expect that cell F6 remain clear until H6 is populated.
    Last edited by Potholes; 07-23-2019 at 04:24 AM. Reason: Additional info missed

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,493

    Re: include some error checking code to this code

    My file is just your file with the code in the right place ...

    I am sure one of the experts can iron it out.

  5. #5
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    Re: include some error checking code to this code

    Hi Ali

    Thanks for your input today.

    I was hoping this thread was going to be an easy one.


    CYR

    Pete

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,493

    Re: include some error checking code to this code

    Patience, Peter, please.

  7. #7
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    Re: include some error checking code to this code

    Hi all

    I added to the code in post 1 here, in the error checking, I tried
    it however it did not work, I offer this in case someone can see what is wrong
    and can supply a solution.



    Please Login or Register  to view this content.
    Pete
    Last edited by Potholes; 07-24-2019 at 02:04 AM. Reason: I duplicated post 7 instead of just an edit.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,493

    Re: include some error checking code to this code

    Why are you checking A1? There will never be anything in that cell. And why do you need to clear B1?

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    N
    O
    P
    Q
    1
    Time Out 2nd leg
    2
    Rider Number, 1st Leg & Time
    3
    Time Out Ride Base
    4
    Open Rider
    Rider No
    80k
    Checkpoint
    Time In
    W / V
    Is Rider V or W
    5
    0
    6
    8
    2nd leg
    4
    7
    8
    9
    10
    11
    Training Rider
    Rider No
    40k
    Checkpoint
    Time In
    W / V
    Is Rider V or W
    12
    13
    ERROR
    14
    15
    Sheet: FRONT
    Last edited by AliGW; 07-24-2019 at 02:10 AM.

  9. #9
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    Re: include some error checking code to this code

    HI Ali

    My error I just showed the sample code and not what I changed it to.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Potholes; 07-24-2019 at 02:27 AM. Reason: Added Sample file

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,493

    Re: include some error checking code to this code

    I've deleted the accidental duplicate post.

    We shall need an updated workbook with the mod you've made to the code.

  11. #11
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    Re: include some error checking code to this code

    Greetings and sundry

    Owing to the Enduro Exec's moving the goal post, I have to rethink all of my project.

    I will sign off that the outstanding 2 current threads are Solved and re-apply for help later
    after I have had time to work out the logics.

    Peter

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,493

    Re: include some error checking code to this code

    It happens ...

  13. #13
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    Re: include some error checking code to this code

    Hi Alli

    But peeves me off because it is you Helpers that I have asked for help has all done for nothing.

    Thanks for all your help and tutoring.

    Pete

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,493

    Re: include some error checking code to this code

    No, it won't be for nothing, Pete - you will (should) have learnt things that you can apply next time. For example, you won't need to ask again how to make a cell flash or how to convert a cell's value depending on the value given in another cell. These are in your toolbox now, so you won't need to ask again.

+ 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] Clean Up VBA code to include the adding of error handling
    By SlightlyClueless in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 05-19-2019, 05:29 PM
  2. Replies: 5
    Last Post: 11-08-2017, 03:24 AM
  3. Replies: 6
    Last Post: 07-12-2016, 07:38 AM
  4. [SOLVED] Error checking code that will prevent over-writing of a workbook when saving to PDF
    By mike_vr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-02-2012, 10:11 AM
  5. Error Checking Macro Code
    By Traymond in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2011, 02:56 PM
  6. Error Checking Code
    By kylegwell in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-14-2007, 12:41 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