Re: Let's try again: VBA Code stops randomly
- From: "NickHK" <TungCheWah@xxxxxxxxxxx>
- Date: Thu, 15 Mar 2007 16:13:23 +0800
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" <DavidAtCaspian@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B5A2EDA7-AA9B-4667-B488-B944C2AB421F@xxxxxxxxxxxxxxxx
And even worse: Our code rus repeatedly throughout a session - We'venot
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
totally random with us, but breaks somewhere within a loop that is workingExcel
down the *** 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
has decided how many times it is going to run properly during a givengremlin
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
afterwere pressing CTRL+BREAK at random intervals. When Debugging the code
timethis happens, the yellow box points to random lines of code that are
perfectly fine for execution. The project will complete 100% of the
codejust 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
after(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
needsthe 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
Theto be re-loaded)
Has anyone been able to solve this?
--
Regards,
John
"david_bn@xxxxxxxxxxxxxx" wrote:
On Feb 27, 5:03 am, BAC <B...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
This can happen when VBA's internalcodestorage area get screwed up.
andbest solution is to Export allcodeto text files, delete all modules
all itsallcode, then Import the text files. This will cause VBA to purge
Boveyhasainternalcodestorage areas and start with a clean slate. Rob
threeexcellent add-in that automates this whole process down to two or
contained withmouse 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
only on oneExcel. My Word macros have done it, too. Most of the time it's
place.computer. It's a very arbitrary stopping point - never the same
nothingPressing F5 or clicking Continue makes thecodemove on as if
objects. Just ahappened. There are no break points, no errors, no missing
with bothrandom stop like an old car I used to have. 8>( This is
anyOffice 2000 and XP under both Win 2000 and XP.
Ed
"Jon Peltier" <jonxlmv...@xxxxxxxxxxxxxxxxxxx> wrote in message
news:%23RbPonbVHHA.4796@xxxxxxxxxxxxxxxxxxxxxxx
The changing versions brings another thought to mind. Are there
oftenmissing references in the 2003 version of the program? These
validmanifest themselves in seemingly unrelated ways, with perfectly
astatements causing errors.
- Jon
-------
Jon Peltier, MicrosoftExcelMVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______
"Jon Peltier" <jonxlmv...@xxxxxxxxxxxxxxxxxxx> wrote in message
news:eyv3DgbVHHA.4756@xxxxxxxxxxxxxxxxxxxxxxx
Does theexecutionjump from one procedure in one application to
makes medifferent procedure in another application? This statement
acringe: "the calling Access filehasbeenclosed". I think I'd be
add thelittle leery of switching theexecutionlike this. Couldn't you
theExcelbasedcodeand portproper application and object references to
contextit into the Access project? This would keepexecutionin one
around.only, although it could do all the same stuff as if it switched
replies.
- Jon
-------
Jon Peltier, MicrosoftExcelMVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______
"BAC" <B...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1EA44B18-2F6F-4E11-8885-4171A20A3479@xxxxxxxxxxxxxxxx
I posted this several days ago but still have not gotten any
returnsI'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
Access fileresults
fromExcelback to Access.
In the middle of theExcelportion of the VBA (the calling
out ahas
beenclosed) the VBA begins and continues to arbitrarily spit
up a"Code
executionhasbeeninterrupted" dialog box. Selecting Debug turns
routine todifferentcodeline each time; selecting continue allows the
Office 2000continue until the next "arbitrary" interruption.
This did not occure when we were running Win 2000 Pro and
thisPro.
Is this an XP or Office 2003 issue?
I have "googled" the error and found several discussions of
clearactivity,
but have yet to find a clear delineation of its cause or a
hittersprocess/procedure for eliminating it, even tho some real heavy
weak in(MVP's) have addressed this question. Even the KB is really
head!this
area.
Any help would be appreciated -> my users are looking for my
BAC- Hide quoted text -
- Show quoted text -
Hi,
Mine now stops randomly within the code of the Code Cleaner!!
Can anyone beat that??
.
- Follow-Ups:
- Re: Let's try again: VBA Code stops randomly
- From: DavidAtCaspian
- Re: Let's try again: VBA Code stops randomly
- From: John Keith
- Re: Let's try again: VBA Code stops randomly
- References:
- Re: Let's try again: VBA Code stops randomly
- From: david_bn
- Re: Let's try again: VBA Code stops randomly
- From: John Keith
- Re: Let's try again: VBA Code stops randomly
- From: DavidAtCaspian
- Re: Let's try again: VBA Code stops randomly
- Prev by Date: find duplicate entry and replace across sheets
- Next by Date: Re: Display multiple results in 1 cell
- Previous by thread: Re: Let's try again: VBA Code stops randomly
- Next by thread: Re: Let's try again: VBA Code stops randomly
- Index(es):