+ Reply to Thread
Page 6 of 6 FirstFirst ... 456
Results 76 to 79 of 79
  1. #76
    Valued Forum Contributor blane245's Avatar
    Join Date
    02-20-2009
    Location
    Melbourne, FL
    MS-Off Ver
    Excel 2010
    Posts
    612

    Re: Do's and Don'ts So Others Won't

    What R. said! I will use multiple Resume Next/GoTo 0 segments if I am trying to trap multiple different errors in the ame routine, but never leave a Resume Next open for more than a single statement and its error handler.
    Bob
    Tip my scale if my answer helped you. Mark the thread as [SOLVED] if it has been.

  2. #77
    Forum Moderator Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    1,946

    Re: Do's and Don'ts So Others Won't

    So then I do not have to go into all of my modules and the On Error Resume Next. Good to know. I know it is unlikely to catch all errors but I like to use If statements when I know that an error happens. In my own opinion, taking the time to test code in regards to the process it is to perform is the best way. It is time consuming (and something that most employers do not like) but it is an effective approach to code design.
    -Mordred

    If you are satisfied by any member's response to your problem please let them know by clicking their star icon at the bottom left of each post.

    If you feel that your problem has been resolved, please mark
    your thread as solved.


    Forum Rules

    Keep on coding in the free world

  3. #78
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    MS 2007
    Posts
    4,972

    Re: Do's and Don'ts So Others Won't

    FYI, this discussion is very educational for me. I've been teaching myself VBA (with the help of everyone here) and most of my brainpower has gone to wrapping my brain around the code. I'm just now starting to look at error handling. Thanks to all.
    ChemistB
    My 2¢

    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

  4. #79
    Forum Guru Domski's Avatar
    Join Date
    12-14-2009
    Location
    Leeds, UK
    MS-Off Ver
    2003 (work), 2007 & 2010 (home)
    Posts
    3,517

    Re: Do's and Don'ts So Others Won't

    If it's an education for you I feel like I'm in primary school

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    If you haven't already please take some time to read the Forum Rules.

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

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.2.0