+ Reply to Thread
Results 1 to 9 of 9

Error messages.

  1. #1
    Forum Contributor
    Join Date
    11-11-2007
    Posts
    263

    Error messages.

    When I run a script I get an error message saying there in no data. Which is what I am expecting... but is there a way to make it so instead of seeing that message which will confuse non-tech people to no end for some reason.

    Is there a way to change that through VBA or a setting somewhere that can be attached to the workbook so when that message comes up instead of saying error ##: no data, it will say something like "The data you are attempting to import has already been imported, there is no new data, please update the XXXX Tab and run this script again."?

    Thanks.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error messages.

    probably yes-depends on the script.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    04-09-2012
    Location
    São Paulo, Brazil
    MS-Off Ver
    Excel 2007
    Posts
    78

    Re: Error messages.

    Cyberpawz,

    Sorry, but when you say you are running a script you mean you are running a Macro?

    If Yes you can use de ONERROR command.

  4. #4
    Forum Contributor
    Join Date
    11-11-2007
    Posts
    263

    Re: Error messages.

    Quote Originally Posted by Pulsus View Post
    Cyberpawz,

    Sorry, but when you say you are running a script you mean you are running a Macro?

    If Yes you can use de ONERROR command.
    Sorry, yes a Macro... old school terminology back from the early 90s... I still lapse into it at times.

    That being said, the onerror is for a blanket error... correct? Not if error 51, or error 13, etc...

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error messages.

    you can use on error resume next, then test the err.number
    if you post the code we could be more specific. ;-)

  6. #6
    Forum Contributor
    Join Date
    11-11-2007
    Posts
    263

    Re: Error messages.

    There isn't one created yet, I'm asking because I've not seen anything like this except for the generic "canned" message.

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error messages.

    but you said you got the error when running a script?

  8. #8
    Forum Contributor
    Join Date
    11-11-2007
    Posts
    263

    Re: Error messages.

    Quote Originally Posted by JosephP View Post
    but you said you got the error when running a script?
    Only if nothing is transferred from one tab to another, which is an expected error.

  9. #9
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error messages.

    that is the code I was talking about. if you want to trap/handle/bypass the error it would help to see the code that causes it.

+ 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