+ Reply to Thread
Results 1 to 5 of 5

Need help with debug issue with macro

  1. #1
    Registered User
    Join Date
    09-03-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    37

    Need help with debug issue with macro

    I have a macro for a count down timer that works fine until I open another excel file. I get the debug error message. Can anyone help me with my code so this does not happen? I attached a pic of the line that Excel highlights when I open a new excel file and then I also pasted my timer code. Thanks

    Please Login or Register  to view this content.
    Attached Images Attached Images

  2. #2
    Registered User
    Join Date
    09-03-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Need help with debug issue with macro

    So my attachment didn't work. hahaha But here is the line that gets highlighted.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Need help with debug issue with macro

    What is your starting value in E1? If it is blank you'd get an error for trying to substract timeserial from nothing
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Registered User
    Join Date
    09-03-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Need help with debug issue with macro

    E1 has the time 02:00:00. The timer itself works fine as long as that is the only Excel workbook I have open. It's when I try to open another workbook that I get the error. Also found out that if I try to close or stop the timer before it finishes counting down, I get the error message too. Thanks so much for your help.

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Need help with debug issue with macro

    Sorry didn't read the first post thoroughly enough. The problem is you are specifying a range with no specific workbook context... try this mod and let me know?

    Please Login or Register  to view this content.

+ 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. VBA Code Runs in Debug Mode But Returns Type Mismatch Error Outside Debug Mode
    By valerie.k.chiang in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2014, 03:48 PM
  2. Macro is hanging. Help me debug?
    By farzyness in forum Excel General
    Replies: 2
    Last Post: 08-26-2010, 10:34 AM
  3. Macro - debug error
    By emptycucumber in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-19-2009, 07:03 AM
  4. debug issue
    By savithrianandh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-13-2007, 09:51 AM
  5. VBA issue, debug
    By ophelia in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2006, 05:45 AM

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