+ Reply to Thread
Results 1 to 3 of 3

Error trapping and branching in a sub routine

  1. #1
    Registered User
    Join Date
    01-15-2012
    Location
    Hampshire
    MS-Off Ver
    Excel 2007
    Posts
    38

    Error trapping and branching in a sub routine

    I have the following macro attached to my 2007 Excel spreadsheet (is it a macro or VBA?) which is an audit form. The core of the procedure works fine (with no little help from my friends on this forum) but as certain values in the spreadsheet will need to be reviewed on a yearly basis (Budget Day!) I need to ensure that the rates hard-coded into the form are current (by resetting the tax rates and/or the review date) The review date is held in cell F132 and is hidden from the user.

    How do I include a test with branch and label to exit the routine with an error message "Review Required" when the if the current DATE() is > than the date in F132 without performing any other statements in the routine (and does F132 have to have a specific date format)? I need to ensure the spreadsheet is still protected if the "Review Required" message has been issued



    Please Login or Register  to view this content.
    thanks

    Andy

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Error trapping and branching in a sub routine

    The date format in F132 doesn't matter

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-15-2012
    Location
    Hampshire
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: Error trapping and branching in a sub routine

    AlphaFrog

    That's absolutely perfect for what I want though it's a completely different approach to what I was expecting.

    Sorry I missed you last night (time zones!) - thanks very much for your help and prompt reply

    Andy

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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