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??