![]() |
Let's try again: VBA Code stops randomly
I posted this several days ago but still have not gotten any replies. I've
tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves to Excel, then returns results from Excel back to Access. In the middle of the Excel portion of the VBA (the calling Access file has been closed) the VBA begins and continues to arbitrarily spit out a "Code execution has been interrupted" dialog box. Selecting Debug turns up a different code line each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC |
Let's try again: VBA Code stops randomly
Does the execution jump from one procedure in one application to a different
procedure in another application? This statement makes me cringe: "the calling Access file has been closed". I think I'd be a little leery of switching the execution like this. Couldn't you add the proper application and object references to the Excel based code and port it into the Access project? This would keep execution in one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves to Excel, then returns results from Excel back to Access. In the middle of the Excel portion of the VBA (the calling Access file has been closed) the VBA begins and continues to arbitrarily spit out a "Code execution has been interrupted" dialog box. Selecting Debug turns up a different code line each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC |
Let's try again: VBA Code stops randomly
The changing versions brings another thought to mind. Are there any missing
references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does the execution jump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access file has been closed". I think I'd be a little leery of switching the execution like this. Couldn't you add the proper application and object references to the Excel based code and port it into the Access project? This would keep execution in one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves to Excel, then returns results from Excel back to Access. In the middle of the Excel portion of the VBA (the calling Access file has been closed) the VBA begins and continues to arbitrarily spit out a "Code execution has been interrupted" dialog box. Selecting Debug turns up a different code line each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC |
Let's try again: VBA Code stops randomly
Jon: My macros have done the same thing, and they are all contained with
Excel. My Word macros have done it, too. Most of the time it's only on one computer. It's a very arbitrary stopping point - never the same place. Pressing F5 or clicking Continue makes the code move on as if nothing happened. There are no break points, no errors, no missing objects. Just a random stop like an old car I used to have. 8( This is with both Office 2000 and XP under both Win 2000 and XP. Ed "Jon Peltier" wrote in message ... The changing versions brings another thought to mind. Are there any missing references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does the execution jump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access file has been closed". I think I'd be a little leery of switching the execution like this. Couldn't you add the proper application and object references to the Excel based code and port it into the Access project? This would keep execution in one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves to Excel, then returns results from Excel back to Access. In the middle of the Excel portion of the VBA (the calling Access file has been closed) the VBA begins and continues to arbitrarily spit out a "Code execution has been interrupted" dialog box. Selecting Debug turns up a different code line each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC |
Let's try again: VBA Code stops randomly
Hi, try posting the code snippet to get help faster.
"BAC" wrote: I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves to Excel, then returns results from Excel back to Access. In the middle of the Excel portion of the VBA (the calling Access file has been closed) the VBA begins and continues to arbitrarily spit out a "Code execution has been interrupted" dialog box. Selecting Debug turns up a different code line each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC |
Let's try again: VBA Code stops randomly
Hi All,
I have experienced similar problems in the past, especially when running code (Which l know to be OK) on different PC's, operating systems etc. This may seen simplistic but l ahve found it is often caused by a 'sticky' Esc or Break key. Hope this helps, Regards Michael Beckinsale |
Let's try again: VBA Code stops randomly
The code is like "pages" long and, like I said the stop is pretty much
arbitrary.across procedures and functions "Madhan" wrote: Hi, try posting the code snippet to get help faster. "BAC" wrote: I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves to Excel, then returns results from Excel back to Access. In the middle of the Excel portion of the VBA (the calling Access file has been closed) the VBA begins and continues to arbitrarily spit out a "Code execution has been interrupted" dialog box. Selecting Debug turns up a different code line each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC |
Let's try again: VBA Code stops randomly
Well, then, seems I'm not alone!
"Ed" wrote: Jon: My macros have done the same thing, and they are all contained with Excel. My Word macros have done it, too. Most of the time it's only on one computer. It's a very arbitrary stopping point - never the same place. Pressing F5 or clicking Continue makes the code move on as if nothing happened. There are no break points, no errors, no missing objects. Just a random stop like an old car I used to have. 8( This is with both Office 2000 and XP under both Win 2000 and XP. Ed "Jon Peltier" wrote in message ... The changing versions brings another thought to mind. Are there any missing references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does the execution jump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access file has been closed". I think I'd be a little leery of switching the execution like this. Couldn't you add the proper application and object references to the Excel based code and port it into the Access project? This would keep execution in one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves to Excel, then returns results from Excel back to Access. In the middle of the Excel portion of the VBA (the calling Access file has been closed) the VBA begins and continues to arbitrarily spit out a "Code execution has been interrupted" dialog box. Selecting Debug turns up a different code line each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC |
Let's try again: VBA Code stops randomly
I've vrified all the required references. The Excel portion of the routine is
an automation of a 28 step process that was done a couple years ago, and to be honest with you, it's a bit convoluted so i really don't want to mess with it. It worked fine under Win 2000/Office 2000 "Jon Peltier" wrote: Does the execution jump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access file has been closed". I think I'd be a little leery of switching the execution like this. Couldn't you add the proper application and object references to the Excel based code and port it into the Access project? This would keep execution in one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves to Excel, then returns results from Excel back to Access. In the middle of the Excel portion of the VBA (the calling Access file has been closed) the VBA begins and continues to arbitrarily spit out a "Code execution has been interrupted" dialog box. Selecting Debug turns up a different code line each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC |
Let's try again: VBA Code stops randomly
Not at all - in having the problem and in lacking an answer!
Ed "BAC" wrote in message ... Well, then, seems I'm not alone! "Ed" wrote: Jon: My macros have done the same thing, and they are all contained with Excel. My Word macros have done it, too. Most of the time it's only on one computer. It's a very arbitrary stopping point - never the same place. Pressing F5 or clicking Continue makes the code move on as if nothing happened. There are no break points, no errors, no missing objects. Just a random stop like an old car I used to have. 8( This is with both Office 2000 and XP under both Win 2000 and XP. Ed "Jon Peltier" wrote in message ... The changing versions brings another thought to mind. Are there any missing references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does the execution jump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access file has been closed". I think I'd be a little leery of switching the execution like this. Couldn't you add the proper application and object references to the Excel based code and port it into the Access project? This would keep execution in one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves to Excel, then returns results from Excel back to Access. In the middle of the Excel portion of the VBA (the calling Access file has been closed) the VBA begins and continues to arbitrarily spit out a "Code execution has been interrupted" dialog box. Selecting Debug turns up a different code line each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC |
Let's try again: VBA Code stops randomly
This can happen when VBA's internal code storage area get screwed up. The
best solution is to Export all code to text files, delete all modules and all code, then Import the text files. This will cause VBA to purge all its internal code storage areas and start with a clean slate. Rob Bovey has a excellent add-in that automates this whole process down to two or three mouse clicks. See http://www.appspro.com/Utilities/CodeCleaner.htm Rob's Code Cleaner is a "must have" add-in for any serious Excel development. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) "michael.beckinsale" wrote: Hi All, I have experienced similar problems in the past, especially when running code (Which l know to be OK) on different PC's, operating systems etc. This may seen simplistic but l ahve found it is often caused by a 'sticky' Esc or Break key. Hope this helps, Regards Michael Beckinsale |
Let's try again: VBA Code stops randomly
This can happen when VBA's internal code storage area get screwed up. The
best solution is to Export all code to text files, delete all modules and all code, then Import the text files. This will cause VBA to purge all its internal code storage areas and start with a clean slate. Rob Bovey has a excellent add-in that automates this whole process down to two or three mouse clicks. See http://www.appspro.com/Utilities/CodeCleaner.htm Rob's Code Cleaner is a "must have" add-in for any serious Excel development. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) "Ed" wrote: Jon: My macros have done the same thing, and they are all contained with Excel. My Word macros have done it, too. Most of the time it's only on one computer. It's a very arbitrary stopping point - never the same place. Pressing F5 or clicking Continue makes the code move on as if nothing happened. There are no break points, no errors, no missing objects. Just a random stop like an old car I used to have. 8( This is with both Office 2000 and XP under both Win 2000 and XP. Ed "Jon Peltier" wrote in message ... The changing versions brings another thought to mind. Are there any missing references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does the execution jump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access file has been closed". I think I'd be a little leery of switching the execution like this. Couldn't you add the proper application and object references to the Excel based code and port it into the Access project? This would keep execution in one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves to Excel, then returns results from Excel back to Access. In the middle of the Excel portion of the VBA (the calling Access file has been closed) the VBA begins and continues to arbitrarily spit out a "Code execution has been interrupted" dialog box. Selecting Debug turns up a different code line each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC |
Let's try again: VBA Code stops randomly
On Feb 27, 5:03 am, BAC wrote:
This can happen when VBA's internalcodestorage area get screwed up. The best solution is to Export allcodeto text files, delete all modules and allcode, then Import the text files. This will cause VBA to purge all its internalcodestorage areas and start with a clean slate. Rob Boveyhasa excellent add-in that automates this whole process down to two or three mouse clicks. Seehttp://www.appspro.com/Utilities/CodeCleaner.htm Rob'sCodeCleaner is a "must have" add-in for any seriousExcel development. -- Cordially, Chip Pearson Microsoft MVP -Excel Pearson Software Consulting, LLCwww.cpearson.com (email address is on the web site) "Ed" wrote: Jon: My macros have done the same thing, and they are all contained with Excel. My Word macros have done it, too. Most of the time it's only on one computer. It's a very arbitrary stopping point - never the same place. Pressing F5 or clicking Continue makes thecodemove on as if nothing happened. There are no break points, no errors, no missing objects. Just a random stop like an old car I used to have. 8( This is with both Office 2000 and XP under both Win 2000 and XP. Ed "Jon Peltier" wrote in message ... The changing versions brings another thought to mind. Are there any missing references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does theexecutionjump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access filehasbeenclosed". I think I'd be a little leery of switching theexecutionlike this. Couldn't you add the proper application and object references to theExcelbasedcodeand port it into the Access project? This would keepexecutionin one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves toExcel, then returns results fromExcelback to Access. In the middle of theExcelportion of the VBA (the calling Access file has beenclosed) the VBA begins and continues to arbitrarily spit out a "Code executionhasbeeninterrupted" dialog box. Selecting Debug turns up a differentcodeline each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC- Hide quoted text - - Show quoted text - Hi, Mine now stops randomly within the code of the Code Cleaner!! Can anyone beat that?? |
Let's try again: VBA Code stops randomly
David, lock your project with a password and click on the the option to lock
the project from viewing. It forces the code to keep running. If you are debugging, you will have to click the run button to get it to start again. The problem happens sometimes (in addition to corruption) if you have been in Excel too long, or if you have over 500 or so rows in a module. Bob Flanagan Macro Systems 144 Dewberry Drive Hockessin, Delaware, U.S. 19707 Phone: 302-234-9857, cell 302-584-1771 http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel wrote in message oups.com... On Feb 27, 5:03 am, BAC wrote: This can happen when VBA's internalcodestorage area get screwed up. The best solution is to Export allcodeto text files, delete all modules and allcode, then Import the text files. This will cause VBA to purge all its internalcodestorage areas and start with a clean slate. Rob Boveyhasa excellent add-in that automates this whole process down to two or three mouse clicks. Seehttp://www.appspro.com/Utilities/CodeCleaner.htm Rob'sCodeCleaner is a "must have" add-in for any seriousExcel development. -- Cordially, Chip Pearson Microsoft MVP -Excel Pearson Software Consulting, LLCwww.cpearson.com (email address is on the web site) "Ed" wrote: Jon: My macros have done the same thing, and they are all contained with Excel. My Word macros have done it, too. Most of the time it's only on one computer. It's a very arbitrary stopping point - never the same place. Pressing F5 or clicking Continue makes thecodemove on as if nothing happened. There are no break points, no errors, no missing objects. Just a random stop like an old car I used to have. 8( This is with both Office 2000 and XP under both Win 2000 and XP. Ed "Jon Peltier" wrote in message ... The changing versions brings another thought to mind. Are there any missing references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does theexecutionjump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access filehasbeenclosed". I think I'd be a little leery of switching theexecutionlike this. Couldn't you add the proper application and object references to theExcelbasedcodeand port it into the Access project? This would keepexecutionin one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves toExcel, then returns results fromExcelback to Access. In the middle of theExcelportion of the VBA (the calling Access file has beenclosed) the VBA begins and continues to arbitrarily spit out a "Code executionhasbeeninterrupted" dialog box. Selecting Debug turns up a differentcodeline each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC- Hide quoted text - - Show quoted text - Hi, Mine now stops randomly within the code of the Code Cleaner!! Can anyone beat that?? |
Let's try again: VBA Code stops randomly
I've encountered the same problem with the "Code Execution Interrupted" error. Setting the EnableCancelKey property on the Application object to xlDisabled in the first line of code (ie."Application.EnableCancelKey = xlDisabled") seems to have fixed the issue. I don't if this will work in all cases, but it worked for me. Hope this helps. *** Sent via Developersdex http://www.developersdex.com *** |
Let's try again: VBA Code stops randomly
I have this same problem. It happened on one machine about two weeks ago and
has now spread to three. The code is not complicated, and has run perectly fine for months .. I've checked for viruses and spyware, run the code cleaner tool (which worked last week, but doesn't today) I haven't come across the application cancel key one befo Surely this is effectively taking away the capability of breaking into the code with CTRL-Break? And if so, seems to indicate that 'something' on these PCs is simulating this key combination spontaneously -- but only in Excel -- so far, none of my Access code is suffering. If I didn't know better I'd say that a recent automatic update might be the culprit. "Grant Briggs" wrote: I've encountered the same problem with the "Code Execution Interrupted" error. Setting the EnableCancelKey property on the Application object to xlDisabled in the first line of code (ie."Application.EnableCancelKey = xlDisabled") seems to have fixed the issue. I don't if this will work in all cases, but it worked for me. Hope this helps. *** Sent via Developersdex http://www.developersdex.com *** |
Let's try again: VBA Code stops randomly
I'm having the same problem described by BAC. Random breaks as if a gremlin
were pressing CTRL+BREAK at random intervals. When Debugging the code after this happens, the yellow box points to random lines of code that are perfectly fine for execution. The project will complete 100% of the time just be "continue"ing execution after each random break. I loaded Rob Bovey's code cleaner and tried it. I got it to work after enabling the trust for VBA projects... AND "Continue"ing through its code (the gremlin saw the cleaner code running too and tried to break it) HOWEVER: the cleaned project still randomly stops execution. Could there be some excel modules that are corrupt? The code cleaner after the initial install, immediately started randomly breaking... so the root-casue of this issue can not be with the VBE-editor's internal code storage (unless it is being corrupted by a corrupted excel-module that needs to be re-loaded) Has anyone been able to solve this? -- Regards, John " wrote: On Feb 27, 5:03 am, BAC wrote: This can happen when VBA's internalcodestorage area get screwed up. The best solution is to Export allcodeto text files, delete all modules and allcode, then Import the text files. This will cause VBA to purge all its internalcodestorage areas and start with a clean slate. Rob Boveyhasa excellent add-in that automates this whole process down to two or three mouse clicks. Seehttp://www.appspro.com/Utilities/CodeCleaner.htm Rob'sCodeCleaner is a "must have" add-in for any seriousExcel development. -- Cordially, Chip Pearson Microsoft MVP -Excel Pearson Software Consulting, LLCwww.cpearson.com (email address is on the web site) "Ed" wrote: Jon: My macros have done the same thing, and they are all contained with Excel. My Word macros have done it, too. Most of the time it's only on one computer. It's a very arbitrary stopping point - never the same place. Pressing F5 or clicking Continue makes thecodemove on as if nothing happened. There are no break points, no errors, no missing objects. Just a random stop like an old car I used to have. 8( This is with both Office 2000 and XP under both Win 2000 and XP. Ed "Jon Peltier" wrote in message ... The changing versions brings another thought to mind. Are there any missing references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does theexecutionjump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access filehasbeenclosed". I think I'd be a little leery of switching theexecutionlike this. Couldn't you add the proper application and object references to theExcelbasedcodeand port it into the Access project? This would keepexecutionin one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves toExcel, then returns results fromExcelback to Access. In the middle of theExcelportion of the VBA (the calling Access file has beenclosed) the VBA begins and continues to arbitrarily spit out a "Code executionhasbeeninterrupted" dialog box. Selecting Debug turns up a differentcodeline each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC- Hide quoted text - - Show quoted text - Hi, Mine now stops randomly within the code of the Code Cleaner!! Can anyone beat that?? |
Let's try again: VBA Code stops randomly
And even worse: Our code rus repeatedly throughout a session - We've
automated a copy/paste routine. When we first start up, the code runs through. Then is begins to break, then later it breaks all the time. It's not totally random with us, but breaks somewhere within a loop that is working down the sheet to find an empty cell. It usually breaks on the 'WEND' line (but at different rows.) If not then within three lines of it. The work rounf of Enter-F5 always result in sucessful completion of that cycle. And as you say John, it lokks EXACTLY like a poltergeist has noticed a bit of nicely running code and is hitting ctrl-break for us. We've tried it with or without the source (web based) application running, we've tried doing the copy/paste manually, all to no avail. - It as if Excel has decided how many times it is going to run properly during a given session, and then just gives up. We have looked at the upgrade history on the machines, and cannot find any changes that coincide with the start of the problem. The problem is spreadin just like a disease.......... "John Keith" wrote: I'm having the same problem described by BAC. Random breaks as if a gremlin were pressing CTRL+BREAK at random intervals. When Debugging the code after this happens, the yellow box points to random lines of code that are perfectly fine for execution. The project will complete 100% of the time just be "continue"ing execution after each random break. I loaded Rob Bovey's code cleaner and tried it. I got it to work after enabling the trust for VBA projects... AND "Continue"ing through its code (the gremlin saw the cleaner code running too and tried to break it) HOWEVER: the cleaned project still randomly stops execution. Could there be some excel modules that are corrupt? The code cleaner after the initial install, immediately started randomly breaking... so the root-casue of this issue can not be with the VBE-editor's internal code storage (unless it is being corrupted by a corrupted excel-module that needs to be re-loaded) Has anyone been able to solve this? -- Regards, John " wrote: On Feb 27, 5:03 am, BAC wrote: This can happen when VBA's internalcodestorage area get screwed up. The best solution is to Export allcodeto text files, delete all modules and allcode, then Import the text files. This will cause VBA to purge all its internalcodestorage areas and start with a clean slate. Rob Boveyhasa excellent add-in that automates this whole process down to two or three mouse clicks. Seehttp://www.appspro.com/Utilities/CodeCleaner.htm Rob'sCodeCleaner is a "must have" add-in for any seriousExcel development. -- Cordially, Chip Pearson Microsoft MVP -Excel Pearson Software Consulting, LLCwww.cpearson.com (email address is on the web site) "Ed" wrote: Jon: My macros have done the same thing, and they are all contained with Excel. My Word macros have done it, too. Most of the time it's only on one computer. It's a very arbitrary stopping point - never the same place. Pressing F5 or clicking Continue makes thecodemove on as if nothing happened. There are no break points, no errors, no missing objects. Just a random stop like an old car I used to have. 8( This is with both Office 2000 and XP under both Win 2000 and XP. Ed "Jon Peltier" wrote in message ... The changing versions brings another thought to mind. Are there any missing references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does theexecutionjump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access filehasbeenclosed". I think I'd be a little leery of switching theexecutionlike this. Couldn't you add the proper application and object references to theExcelbasedcodeand port it into the Access project? This would keepexecutionin one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves toExcel, then returns results fromExcelback to Access. In the middle of theExcelportion of the VBA (the calling Access file has beenclosed) the VBA begins and continues to arbitrarily spit out a "Code executionhasbeeninterrupted" dialog box. Selecting Debug turns up a differentcodeline each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC- Hide quoted text - - Show quoted text - Hi, Mine now stops randomly within the code of the Code Cleaner!! Can anyone beat that?? |
Let's try again: VBA Code stops randomly
Assuming you tried all other normal fixes, what happens if you run the code
from a VBScript instead of from within VBA ? It will involve a slight re-write, but the basic code will be the same. No idea if it will make a difference, but if you are out of other ideas ... NickHK "DavidAtCaspian" wrote in message ... And even worse: Our code rus repeatedly throughout a session - We've automated a copy/paste routine. When we first start up, the code runs through. Then is begins to break, then later it breaks all the time. It's not totally random with us, but breaks somewhere within a loop that is working down the sheet to find an empty cell. It usually breaks on the 'WEND' line (but at different rows.) If not then within three lines of it. The work rounf of Enter-F5 always result in sucessful completion of that cycle. And as you say John, it lokks EXACTLY like a poltergeist has noticed a bit of nicely running code and is hitting ctrl-break for us. We've tried it with or without the source (web based) application running, we've tried doing the copy/paste manually, all to no avail. - It as if Excel has decided how many times it is going to run properly during a given session, and then just gives up. We have looked at the upgrade history on the machines, and cannot find any changes that coincide with the start of the problem. The problem is spreadin just like a disease.......... "John Keith" wrote: I'm having the same problem described by BAC. Random breaks as if a gremlin were pressing CTRL+BREAK at random intervals. When Debugging the code after this happens, the yellow box points to random lines of code that are perfectly fine for execution. The project will complete 100% of the time just be "continue"ing execution after each random break. I loaded Rob Bovey's code cleaner and tried it. I got it to work after enabling the trust for VBA projects... AND "Continue"ing through its code (the gremlin saw the cleaner code running too and tried to break it) HOWEVER: the cleaned project still randomly stops execution. Could there be some excel modules that are corrupt? The code cleaner after the initial install, immediately started randomly breaking... so the root-casue of this issue can not be with the VBE-editor's internal code storage (unless it is being corrupted by a corrupted excel-module that needs to be re-loaded) Has anyone been able to solve this? -- Regards, John " wrote: On Feb 27, 5:03 am, BAC wrote: This can happen when VBA's internalcodestorage area get screwed up. The best solution is to Export allcodeto text files, delete all modules and allcode, then Import the text files. This will cause VBA to purge all its internalcodestorage areas and start with a clean slate. Rob Boveyhasa excellent add-in that automates this whole process down to two or three mouse clicks. Seehttp://www.appspro.com/Utilities/CodeCleaner.htm Rob'sCodeCleaner is a "must have" add-in for any seriousExcel development. -- Cordially, Chip Pearson Microsoft MVP -Excel Pearson Software Consulting, LLCwww.cpearson.com (email address is on the web site) "Ed" wrote: Jon: My macros have done the same thing, and they are all contained with Excel. My Word macros have done it, too. Most of the time it's only on one computer. It's a very arbitrary stopping point - never the same place. Pressing F5 or clicking Continue makes thecodemove on as if nothing happened. There are no break points, no errors, no missing objects. Just a random stop like an old car I used to have. 8( This is with both Office 2000 and XP under both Win 2000 and XP. Ed "Jon Peltier" wrote in message ... The changing versions brings another thought to mind. Are there any missing references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does theexecutionjump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access filehasbeenclosed". I think I'd be a little leery of switching theexecutionlike this. Couldn't you add the proper application and object references to theExcelbasedcodeand port it into the Access project? This would keepexecutionin one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves toExcel, then returns results fromExcelback to Access. In the middle of theExcelportion of the VBA (the calling Access file has beenclosed) the VBA begins and continues to arbitrarily spit out a "Code executionhasbeeninterrupted" dialog box. Selecting Debug turns up a differentcodeline each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC- Hide quoted text - - Show quoted text - Hi, Mine now stops randomly within the code of the Code Cleaner!! Can anyone beat that?? |
Let's try again: VBA Code stops randomly
my VB scripts don't have any problem.
the excel applications are heavily rooted in the excel object. The applications use specialized command bars and drop downs for choosing execution criteria and are genrated on opening based on other sources of data. The apps that are the most basic (although still producing, essentially a formatted report) would work from script, and I do have some that extract data via ADO from SQL-Server data. But the whole point of using excel-VBA was to put the output into a form that was "pretty" to the end-user. -- Regards, John "NickHK" wrote: Assuming you tried all other normal fixes, what happens if you run the code from a VBScript instead of from within VBA ? It will involve a slight re-write, but the basic code will be the same. No idea if it will make a difference, but if you are out of other ideas ... NickHK "DavidAtCaspian" wrote in message ... And even worse: Our code rus repeatedly throughout a session - We've automated a copy/paste routine. When we first start up, the code runs through. Then is begins to break, then later it breaks all the time. It's not totally random with us, but breaks somewhere within a loop that is working down the sheet to find an empty cell. It usually breaks on the 'WEND' line (but at different rows.) If not then within three lines of it. The work rounf of Enter-F5 always result in sucessful completion of that cycle. And as you say John, it lokks EXACTLY like a poltergeist has noticed a bit of nicely running code and is hitting ctrl-break for us. We've tried it with or without the source (web based) application running, we've tried doing the copy/paste manually, all to no avail. - It as if Excel has decided how many times it is going to run properly during a given session, and then just gives up. We have looked at the upgrade history on the machines, and cannot find any changes that coincide with the start of the problem. The problem is spreadin just like a disease.......... "John Keith" wrote: I'm having the same problem described by BAC. Random breaks as if a gremlin were pressing CTRL+BREAK at random intervals. When Debugging the code after this happens, the yellow box points to random lines of code that are perfectly fine for execution. The project will complete 100% of the time just be "continue"ing execution after each random break. I loaded Rob Bovey's code cleaner and tried it. I got it to work after enabling the trust for VBA projects... AND "Continue"ing through its code (the gremlin saw the cleaner code running too and tried to break it) HOWEVER: the cleaned project still randomly stops execution. Could there be some excel modules that are corrupt? The code cleaner after the initial install, immediately started randomly breaking... so the root-casue of this issue can not be with the VBE-editor's internal code storage (unless it is being corrupted by a corrupted excel-module that needs to be re-loaded) Has anyone been able to solve this? -- Regards, John " wrote: On Feb 27, 5:03 am, BAC wrote: This can happen when VBA's internalcodestorage area get screwed up. The best solution is to Export allcodeto text files, delete all modules and allcode, then Import the text files. This will cause VBA to purge all its internalcodestorage areas and start with a clean slate. Rob Boveyhasa excellent add-in that automates this whole process down to two or three mouse clicks. Seehttp://www.appspro.com/Utilities/CodeCleaner.htm Rob'sCodeCleaner is a "must have" add-in for any seriousExcel development. -- Cordially, Chip Pearson Microsoft MVP -Excel Pearson Software Consulting, LLCwww.cpearson.com (email address is on the web site) "Ed" wrote: Jon: My macros have done the same thing, and they are all contained with Excel. My Word macros have done it, too. Most of the time it's only on one computer. It's a very arbitrary stopping point - never the same place. Pressing F5 or clicking Continue makes thecodemove on as if nothing happened. There are no break points, no errors, no missing objects. Just a random stop like an old car I used to have. 8( This is with both Office 2000 and XP under both Win 2000 and XP. Ed "Jon Peltier" wrote in message ... The changing versions brings another thought to mind. Are there any missing references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does theexecutionjump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access filehasbeenclosed". I think I'd be a little leery of switching theexecutionlike this. Couldn't you add the proper application and object references to theExcelbasedcodeand port it into the Access project? This would keepexecutionin one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves toExcel, then returns results fromExcelback to Access. In the middle of theExcelportion of the VBA (the calling Access file has beenclosed) the VBA begins and continues to arbitrarily spit out a "Code executionhasbeeninterrupted" dialog box. Selecting Debug turns up a differentcodeline each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC- Hide quoted text - - Show quoted text - Hi, Mine now stops randomly within the code of the Code Cleaner!! Can anyone beat that?? |
Let's try again: VBA Code stops randomly
Thanks for the input, but what I'm really after is getting perfectly good
code to run without being interruped by an 'impossible' event. Surely someone must know the likely cause of this? (ie I'd really like the product to work the way it is supposed to). We have tried something new today, and since then one the one machine we tried, has not had a recurrence of the problem. Would anyone else like to give it a go, and let us know if it works for you? Do a search in Office for turning off the office multi level clip board. (Personally I've always found this feature to be nearly as irritating as that paper clip). - It is a registry fix at office level, and reverts to just the one clipboard. As I said, we've done this on one machine and not had the problem again. -- BUT then again, none of the other machines have gone wrong today either.!!! By the way, we're on Excel 2002 SP3, and XP (some at SP1, some at SP2), and IE6. David "NickHK" wrote: Assuming you tried all other normal fixes, what happens if you run the code from a VBScript instead of from within VBA ? It will involve a slight re-write, but the basic code will be the same. No idea if it will make a difference, but if you are out of other ideas ... NickHK "DavidAtCaspian" wrote in message ... And even worse: Our code rus repeatedly throughout a session - We've automated a copy/paste routine. When we first start up, the code runs through. Then is begins to break, then later it breaks all the time. It's not totally random with us, but breaks somewhere within a loop that is working down the sheet to find an empty cell. It usually breaks on the 'WEND' line (but at different rows.) If not then within three lines of it. The work rounf of Enter-F5 always result in sucessful completion of that cycle. And as you say John, it lokks EXACTLY like a poltergeist has noticed a bit of nicely running code and is hitting ctrl-break for us. We've tried it with or without the source (web based) application running, we've tried doing the copy/paste manually, all to no avail. - It as if Excel has decided how many times it is going to run properly during a given session, and then just gives up. We have looked at the upgrade history on the machines, and cannot find any changes that coincide with the start of the problem. The problem is spreadin just like a disease.......... "John Keith" wrote: I'm having the same problem described by BAC. Random breaks as if a gremlin were pressing CTRL+BREAK at random intervals. When Debugging the code after this happens, the yellow box points to random lines of code that are perfectly fine for execution. The project will complete 100% of the time just be "continue"ing execution after each random break. I loaded Rob Bovey's code cleaner and tried it. I got it to work after enabling the trust for VBA projects... AND "Continue"ing through its code (the gremlin saw the cleaner code running too and tried to break it) HOWEVER: the cleaned project still randomly stops execution. Could there be some excel modules that are corrupt? The code cleaner after the initial install, immediately started randomly breaking... so the root-casue of this issue can not be with the VBE-editor's internal code storage (unless it is being corrupted by a corrupted excel-module that needs to be re-loaded) Has anyone been able to solve this? -- Regards, John " wrote: On Feb 27, 5:03 am, BAC wrote: This can happen when VBA's internalcodestorage area get screwed up. The best solution is to Export allcodeto text files, delete all modules and allcode, then Import the text files. This will cause VBA to purge all its internalcodestorage areas and start with a clean slate. Rob Boveyhasa excellent add-in that automates this whole process down to two or three mouse clicks. Seehttp://www.appspro.com/Utilities/CodeCleaner.htm Rob'sCodeCleaner is a "must have" add-in for any seriousExcel development. -- Cordially, Chip Pearson Microsoft MVP -Excel Pearson Software Consulting, LLCwww.cpearson.com (email address is on the web site) "Ed" wrote: Jon: My macros have done the same thing, and they are all contained with Excel. My Word macros have done it, too. Most of the time it's only on one computer. It's a very arbitrary stopping point - never the same place. Pressing F5 or clicking Continue makes thecodemove on as if nothing happened. There are no break points, no errors, no missing objects. Just a random stop like an old car I used to have. 8( This is with both Office 2000 and XP under both Win 2000 and XP. Ed "Jon Peltier" wrote in message ... The changing versions brings another thought to mind. Are there any missing references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does theexecutionjump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access filehasbeenclosed". I think I'd be a little leery of switching theexecutionlike this. Couldn't you add the proper application and object references to theExcelbasedcodeand port it into the Access project? This would keepexecutionin one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves toExcel, then returns results fromExcelback to Access. In the middle of theExcelportion of the VBA (the calling Access file has beenclosed) the VBA begins and continues to arbitrarily spit out a "Code executionhasbeeninterrupted" dialog box. Selecting Debug turns up a differentcodeline each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC- Hide quoted text - - Show quoted text - Hi, Mine now stops randomly within the code of the Code Cleaner!! Can anyone beat that?? |
Let's try again: VBA Code stops randomly
I will give it a try!
But I cant seem to find anything about how to turn off the office multi level clip board. Can you post the steps or point me to where you found the instructions. -- Regards, John "DavidAtCaspian" wrote: Thanks for the input, but what I'm really after is getting perfectly good code to run without being interruped by an 'impossible' event. Surely someone must know the likely cause of this? (ie I'd really like the product to work the way it is supposed to). We have tried something new today, and since then one the one machine we tried, has not had a recurrence of the problem. Would anyone else like to give it a go, and let us know if it works for you? Do a search in Office for turning off the office multi level clip board. (Personally I've always found this feature to be nearly as irritating as that paper clip). - It is a registry fix at office level, and reverts to just the one clipboard. As I said, we've done this on one machine and not had the problem again. -- BUT then again, none of the other machines have gone wrong today either.!!! By the way, we're on Excel 2002 SP3, and XP (some at SP1, some at SP2), and IE6. David "NickHK" wrote: Assuming you tried all other normal fixes, what happens if you run the code from a VBScript instead of from within VBA ? It will involve a slight re-write, but the basic code will be the same. No idea if it will make a difference, but if you are out of other ideas ... NickHK "DavidAtCaspian" wrote in message ... And even worse: Our code rus repeatedly throughout a session - We've automated a copy/paste routine. When we first start up, the code runs through. Then is begins to break, then later it breaks all the time. It's not totally random with us, but breaks somewhere within a loop that is working down the sheet to find an empty cell. It usually breaks on the 'WEND' line (but at different rows.) If not then within three lines of it. The work rounf of Enter-F5 always result in sucessful completion of that cycle. And as you say John, it lokks EXACTLY like a poltergeist has noticed a bit of nicely running code and is hitting ctrl-break for us. We've tried it with or without the source (web based) application running, we've tried doing the copy/paste manually, all to no avail. - It as if Excel has decided how many times it is going to run properly during a given session, and then just gives up. We have looked at the upgrade history on the machines, and cannot find any changes that coincide with the start of the problem. The problem is spreadin just like a disease.......... "John Keith" wrote: I'm having the same problem described by BAC. Random breaks as if a gremlin were pressing CTRL+BREAK at random intervals. When Debugging the code after this happens, the yellow box points to random lines of code that are perfectly fine for execution. The project will complete 100% of the time just be "continue"ing execution after each random break. I loaded Rob Bovey's code cleaner and tried it. I got it to work after enabling the trust for VBA projects... AND "Continue"ing through its code (the gremlin saw the cleaner code running too and tried to break it) HOWEVER: the cleaned project still randomly stops execution. Could there be some excel modules that are corrupt? The code cleaner after the initial install, immediately started randomly breaking... so the root-casue of this issue can not be with the VBE-editor's internal code storage (unless it is being corrupted by a corrupted excel-module that needs to be re-loaded) Has anyone been able to solve this? -- Regards, John " wrote: On Feb 27, 5:03 am, BAC wrote: This can happen when VBA's internalcodestorage area get screwed up. The best solution is to Export allcodeto text files, delete all modules and allcode, then Import the text files. This will cause VBA to purge all its internalcodestorage areas and start with a clean slate. Rob Boveyhasa excellent add-in that automates this whole process down to two or three mouse clicks. Seehttp://www.appspro.com/Utilities/CodeCleaner.htm Rob'sCodeCleaner is a "must have" add-in for any seriousExcel development. -- Cordially, Chip Pearson Microsoft MVP -Excel Pearson Software Consulting, LLCwww.cpearson.com (email address is on the web site) "Ed" wrote: Jon: My macros have done the same thing, and they are all contained with Excel. My Word macros have done it, too. Most of the time it's only on one computer. It's a very arbitrary stopping point - never the same place. Pressing F5 or clicking Continue makes thecodemove on as if nothing happened. There are no break points, no errors, no missing objects. Just a random stop like an old car I used to have. 8( This is with both Office 2000 and XP under both Win 2000 and XP. Ed "Jon Peltier" wrote in message ... The changing versions brings another thought to mind. Are there any missing references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does theexecutionjump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access filehasbeenclosed". I think I'd be a little leery of switching theexecutionlike this. Couldn't you add the proper application and object references to theExcelbasedcodeand port it into the Access project? This would keepexecutionin one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves toExcel, then returns results fromExcelback to Access. In the middle of theExcelportion of the VBA (the calling Access file has beenclosed) the VBA begins and continues to arbitrarily spit out a "Code executionhasbeeninterrupted" dialog box. Selecting Debug turns up a differentcodeline each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC- Hide quoted text - - Show quoted text - Hi, Mine now stops randomly within the code of the Code Cleaner!! Can anyone beat that?? |
Let's try again: VBA Code stops randomly
John:
Try this link for full instructions. http://www.annoyances.org/exec/show/article08-803 The one machne we did this on has not had the problem again (we re-booted after making the setting). BUT None of the other machines has had a re-occurence either!!! David "John Keith" wrote: I will give it a try! But I cant seem to find anything about how to turn off the office multi level clip board. Can you post the steps or point me to where you found the instructions. -- Regards, John "DavidAtCaspian" wrote: Thanks for the input, but what I'm really after is getting perfectly good code to run without being interruped by an 'impossible' event. Surely someone must know the likely cause of this? (ie I'd really like the product to work the way it is supposed to). We have tried something new today, and since then one the one machine we tried, has not had a recurrence of the problem. Would anyone else like to give it a go, and let us know if it works for you? Do a search in Office for turning off the office multi level clip board. (Personally I've always found this feature to be nearly as irritating as that paper clip). - It is a registry fix at office level, and reverts to just the one clipboard. As I said, we've done this on one machine and not had the problem again. -- BUT then again, none of the other machines have gone wrong today either.!!! By the way, we're on Excel 2002 SP3, and XP (some at SP1, some at SP2), and IE6. David "NickHK" wrote: Assuming you tried all other normal fixes, what happens if you run the code from a VBScript instead of from within VBA ? It will involve a slight re-write, but the basic code will be the same. No idea if it will make a difference, but if you are out of other ideas ... NickHK "DavidAtCaspian" wrote in message ... And even worse: Our code rus repeatedly throughout a session - We've automated a copy/paste routine. When we first start up, the code runs through. Then is begins to break, then later it breaks all the time. It's not totally random with us, but breaks somewhere within a loop that is working down the sheet to find an empty cell. It usually breaks on the 'WEND' line (but at different rows.) If not then within three lines of it. The work rounf of Enter-F5 always result in sucessful completion of that cycle. And as you say John, it lokks EXACTLY like a poltergeist has noticed a bit of nicely running code and is hitting ctrl-break for us. We've tried it with or without the source (web based) application running, we've tried doing the copy/paste manually, all to no avail. - It as if Excel has decided how many times it is going to run properly during a given session, and then just gives up. We have looked at the upgrade history on the machines, and cannot find any changes that coincide with the start of the problem. The problem is spreadin just like a disease.......... "John Keith" wrote: I'm having the same problem described by BAC. Random breaks as if a gremlin were pressing CTRL+BREAK at random intervals. When Debugging the code after this happens, the yellow box points to random lines of code that are perfectly fine for execution. The project will complete 100% of the time just be "continue"ing execution after each random break. I loaded Rob Bovey's code cleaner and tried it. I got it to work after enabling the trust for VBA projects... AND "Continue"ing through its code (the gremlin saw the cleaner code running too and tried to break it) HOWEVER: the cleaned project still randomly stops execution. Could there be some excel modules that are corrupt? The code cleaner after the initial install, immediately started randomly breaking... so the root-casue of this issue can not be with the VBE-editor's internal code storage (unless it is being corrupted by a corrupted excel-module that needs to be re-loaded) Has anyone been able to solve this? -- Regards, John " wrote: On Feb 27, 5:03 am, BAC wrote: This can happen when VBA's internalcodestorage area get screwed up. The best solution is to Export allcodeto text files, delete all modules and allcode, then Import the text files. This will cause VBA to purge all its internalcodestorage areas and start with a clean slate. Rob Boveyhasa excellent add-in that automates this whole process down to two or three mouse clicks. Seehttp://www.appspro.com/Utilities/CodeCleaner.htm Rob'sCodeCleaner is a "must have" add-in for any seriousExcel development. -- Cordially, Chip Pearson Microsoft MVP -Excel Pearson Software Consulting, LLCwww.cpearson.com (email address is on the web site) "Ed" wrote: Jon: My macros have done the same thing, and they are all contained with Excel. My Word macros have done it, too. Most of the time it's only on one computer. It's a very arbitrary stopping point - never the same place. Pressing F5 or clicking Continue makes thecodemove on as if nothing happened. There are no break points, no errors, no missing objects. Just a random stop like an old car I used to have. 8( This is with both Office 2000 and XP under both Win 2000 and XP. Ed "Jon Peltier" wrote in message ... The changing versions brings another thought to mind. Are there any missing references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does theexecutionjump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access filehasbeenclosed". I think I'd be a little leery of switching theexecutionlike this. Couldn't you add the proper application and object references to theExcelbasedcodeand port it into the Access project? This would keepexecutionin one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves toExcel, then returns results fromExcelback to Access. In the middle of theExcelportion of the VBA (the calling Access file has beenclosed) the VBA begins and continues to arbitrarily spit out a "Code executionhasbeeninterrupted" dialog box. Selecting Debug turns up a differentcodeline each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC- Hide quoted text - - Show quoted text - Hi, Mine now stops randomly within the code of the Code Cleaner!! Can anyone beat that?? |
Let's try again: VBA Code stops randomly
Issue resolved... for now.
Before I had a chance to try the changes in the registry to turn off the multi-clipboard feature, a windows update came through which rebooted the PC. I really doubt the windows update has anything to do with the issue resolving itself. I think the reboot is what solved the problem. My PC stays up all the time and I rarely reboot. But since then, the random breaks have ceased. I did bookmark the page you linked and if I do have the problem show up again and a simple reboot doesn't solve the problem I'll give it a try. -- Regards, John "DavidAtCaspian" wrote: John: Try this link for full instructions. http://www.annoyances.org/exec/show/article08-803 The one machne we did this on has not had the problem again (we re-booted after making the setting). BUT None of the other machines has had a re-occurence either!!! David "John Keith" wrote: I will give it a try! But I cant seem to find anything about how to turn off the office multi level clip board. Can you post the steps or point me to where you found the instructions. -- Regards, John "DavidAtCaspian" wrote: Thanks for the input, but what I'm really after is getting perfectly good code to run without being interruped by an 'impossible' event. Surely someone must know the likely cause of this? (ie I'd really like the product to work the way it is supposed to). We have tried something new today, and since then one the one machine we tried, has not had a recurrence of the problem. Would anyone else like to give it a go, and let us know if it works for you? Do a search in Office for turning off the office multi level clip board. (Personally I've always found this feature to be nearly as irritating as that paper clip). - It is a registry fix at office level, and reverts to just the one clipboard. As I said, we've done this on one machine and not had the problem again. -- BUT then again, none of the other machines have gone wrong today either.!!! By the way, we're on Excel 2002 SP3, and XP (some at SP1, some at SP2), and IE6. David "NickHK" wrote: Assuming you tried all other normal fixes, what happens if you run the code from a VBScript instead of from within VBA ? It will involve a slight re-write, but the basic code will be the same. No idea if it will make a difference, but if you are out of other ideas ... NickHK "DavidAtCaspian" wrote in message ... And even worse: Our code rus repeatedly throughout a session - We've automated a copy/paste routine. When we first start up, the code runs through. Then is begins to break, then later it breaks all the time. It's not totally random with us, but breaks somewhere within a loop that is working down the sheet to find an empty cell. It usually breaks on the 'WEND' line (but at different rows.) If not then within three lines of it. The work rounf of Enter-F5 always result in sucessful completion of that cycle. And as you say John, it lokks EXACTLY like a poltergeist has noticed a bit of nicely running code and is hitting ctrl-break for us. We've tried it with or without the source (web based) application running, we've tried doing the copy/paste manually, all to no avail. - It as if Excel has decided how many times it is going to run properly during a given session, and then just gives up. We have looked at the upgrade history on the machines, and cannot find any changes that coincide with the start of the problem. The problem is spreadin just like a disease.......... "John Keith" wrote: I'm having the same problem described by BAC. Random breaks as if a gremlin were pressing CTRL+BREAK at random intervals. When Debugging the code after this happens, the yellow box points to random lines of code that are perfectly fine for execution. The project will complete 100% of the time just be "continue"ing execution after each random break. I loaded Rob Bovey's code cleaner and tried it. I got it to work after enabling the trust for VBA projects... AND "Continue"ing through its code (the gremlin saw the cleaner code running too and tried to break it) HOWEVER: the cleaned project still randomly stops execution. Could there be some excel modules that are corrupt? The code cleaner after the initial install, immediately started randomly breaking... so the root-casue of this issue can not be with the VBE-editor's internal code storage (unless it is being corrupted by a corrupted excel-module that needs to be re-loaded) Has anyone been able to solve this? -- Regards, John " wrote: On Feb 27, 5:03 am, BAC wrote: This can happen when VBA's internalcodestorage area get screwed up. The best solution is to Export allcodeto text files, delete all modules and allcode, then Import the text files. This will cause VBA to purge all its internalcodestorage areas and start with a clean slate. Rob Boveyhasa excellent add-in that automates this whole process down to two or three mouse clicks. Seehttp://www.appspro.com/Utilities/CodeCleaner.htm Rob'sCodeCleaner is a "must have" add-in for any seriousExcel development. -- Cordially, Chip Pearson Microsoft MVP -Excel Pearson Software Consulting, LLCwww.cpearson.com (email address is on the web site) "Ed" wrote: Jon: My macros have done the same thing, and they are all contained with Excel. My Word macros have done it, too. Most of the time it's only on one computer. It's a very arbitrary stopping point - never the same place. Pressing F5 or clicking Continue makes thecodemove on as if nothing happened. There are no break points, no errors, no missing objects. Just a random stop like an old car I used to have. 8( This is with both Office 2000 and XP under both Win 2000 and XP. Ed "Jon Peltier" wrote in message ... The changing versions brings another thought to mind. Are there any missing references in the 2003 version of the program? These often manifest themselves in seemingly unrelated ways, with perfectly valid statements causing errors. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jon Peltier" wrote in message ... Does theexecutionjump from one procedure in one application to a different procedure in another application? This statement makes me cringe: "the calling Access filehasbeenclosed". I think I'd be a little leery of switching theexecutionlike this. Couldn't you add the proper application and object references to theExcelbasedcodeand port it into the Access project? This would keepexecutionin one context only, although it could do all the same stuff as if it switched around. - Jon ------- Jon Peltier, MicrosoftExcelMVP Tutorials and Custom Solutions http://PeltierTech.com _______ "BAC" wrote in message ... I posted this several days ago but still have not gotten any replies. I've tried everything I can think of, but can't find a solution... Xp pro, Office 2003 Pro I have a routine that begins in Access, moves toExcel, then returns results fromExcelback to Access. In the middle of theExcelportion of the VBA (the calling Access file has beenclosed) the VBA begins and continues to arbitrarily spit out a "Code executionhasbeeninterrupted" dialog box. Selecting Debug turns up a differentcodeline each time; selecting continue allows the routine to continue until the next "arbitrary" interruption. This did not occure when we were running Win 2000 Pro and Office 2000 Pro. Is this an XP or Office 2003 issue? I have "googled" the error and found several discussions of this activity, but have yet to find a clear delineation of its cause or a clear process/procedure for eliminating it, even tho some real heavy hitters (MVP's) have addressed this question. Even the KB is really weak in this area. Any help would be appreciated - my users are looking for my head! BAC- Hide quoted text - - Show quoted text - Hi, Mine now stops randomly within the code of the Code Cleaner!! Can anyone beat that?? |
All times are GMT +1. The time now is 12:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com