+ Reply to Thread
Results 1 to 5 of 5

Thread: Do not show run time error

  1. #1
    Registered User
    Join Date
    02-05-2011
    Location
    kuwait
    MS-Off Ver
    Excel 2007
    Posts
    26

    Do not show run time error

    Dear All,
    Once again I need your help. I have a problem with macro in the attached sheet. When I click submit button all the answers from main sheet are going to results sheet and sheets becomes clear except Tech id and name. The macro is working fine if there is at least one answer. But if all the answer are blank it is showing some runtime error which is also normal becaue there is nothing to clear. But I want it should transfer all the answers as 0 if all the cells are blank without showing any error. Is it possible. If yes kindly solve it for me and amend the code in attached file.
    Thanks in advance for kind support
    Regards.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    5,274

    Re: Do not show run time error

    Hi SEHRA,

    Before the line that gives you the error put a line of
    On Error Resume Next
    and just after the line that gives the error put
    On Error GoTo 0
    See if that helps.
    One test is worth a thousand opinions.
    Click the * below to say thanks.

  3. #3
    Registered User
    Join Date
    02-05-2011
    Location
    kuwait
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Do not show run time error

    Thanks MarvinP.

    you people are genius.

  4. #4
    Registered User
    Join Date
    02-05-2011
    Location
    kuwait
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Do not show run time error

    Dear marvin,

    I want one more help. When i click submit button it should ask me " Do you want to submit your answers" If answers 'yes' it should run macro. if no it should remain in the same sheet.
    Kindly help

  5. #5
    Valued Forum Contributor MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    5,274

    Re: Do not show run time error

    Hi SEHRA,

    You can use an InputBox for the question and then use the answer to Exit Sub or continue on.
    See http://www.exceltips.nl/?tag=inputbox
    or http://www.ozgrid.com/VBA/inputbox-function.htm
    for the method and syntax.
    One test is worth a thousand opinions.
    Click the * below to say thanks.

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