+ Reply to Thread
Results 1 to 7 of 7

Why would a macro just 'stop'???

  1. #1
    Registered User
    Join Date
    02-15-2013
    Location
    Halesite, New York
    MS-Off Ver
    Excel 2010
    Posts
    39

    Why would a macro just 'stop'???

    I just do not understand why THIS happens...
    Please Login or Register  to view this content.
    OK - here is a tricky one. Once I get to this point, my macro "STOPS" after the Workbooks.Open and does not continue. I can do a 'step into' and get it going, but it just ends, and I see Design mode lit. Do I need to return 'focus' to it, in order for the macro to continue?

    Dont understand.... Please help...
    Last edited by gharding14; 08-15-2013 at 05:04 PM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Why would a macro just 'stop'???

    your code works well, attach please a sample file
    If solved remember to mark Thread as solved

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Is there any code in the workbook you are opening that would be triggered when you open it?
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    12-07-2012
    Location
    London, England
    MS-Off Ver
    Office 2010
    Posts
    81

    Re: Why would a macro just 'stop'???

    Sorry to butt in, but as a quick aside, I think that all of the following variables will be variants:

    UserName, OpenString, SavePath, YY, DD, D2, M2, LastRow, I, Protocol, ProjNum, ErrorCode, ErrorRange.

    This is because you have only defined the data type of the last variable in each row, whereas you have to define each one separately.

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

    Re: Why would a macro just 'stop'???

    are you running your macro from a shortcut key combination including the Shift key? if so, don't :-)
    Josie

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

  6. #6
    Registered User
    Join Date
    02-15-2013
    Location
    Halesite, New York
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Why would a macro just 'stop'???

    Thanks for the hints. I will try it this morning. Have a great day folks!

    Gary

  7. #7
    Registered User
    Join Date
    02-15-2013
    Location
    Halesite, New York
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Why would a macro just 'stop'???

    Thanks JosephP. It ran without the damn shortcut...

    Just have to logistically set it up differently. Thanks and cheers,

    Gary

+ 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. Converting workbook with Macro to a template causes the Macro to stop working
    By Skeeta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2012, 02:00 PM
  2. Macro to check Entire Column Q for 0 and stop macro
    By L2012 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-06-2012, 12:36 PM
  3. [SOLVED] Call another Macro or Stop Macro Based on MsgBox Yes or No
    By GStone in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-03-2012, 05:59 PM
  4. Stop macro at the end of data / make macro faster
    By Shaner73 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 08-17-2010, 08:14 AM
  5. Stop Macro, Check Cells & Modify if Necessary, Resume Macro
    By AccountantCost in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2009, 07:39 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