Wow, thanks alot Steve! I'm going to go through this
today with this code.
Thanks again
Gary
-----Original Message-----
Gary,
You can go into the VB editor and step through the code
with the F8 key.
Open the VB editor. Open the module. Click the mouse
anywhere within
the code. Hit F8 to activate each code line.
If that doesn't isolate the problem area - you can set
breaks in your code
by clicking on the left side (grey) border next to some
of the lines. Click
the
mouse anywhere within the code. Hit F5 to run the
macro. It will run to
the
break and stop. Hit F5 again to run to the next break.
Set the breaks
after
each 'major' block of code in your module.
Another thing to do is to put Option Explicit at the top
of your modules
(above all the code). Go to the Debug menu and select
Compile. Excel
should point out major problems with your code. Repeat
this until you
don't get anymore.
Also go to this site and download the code cleaner. It
helps clean up your
projects
http://www.appspro.com/
--
sb
"Gary" wrote in
message
...
I have one of the errors that was produced:
Automation error Exception occured
This was from simply running a selct sheet command.
But
like I said, we reran it instantly and did not get the
error again...without changing the macro at all. It is
very weird.
The other error messages contain the following
information: AppName: excel.exe AppVer: 10.0.4302.0
ModName: excel.exe ModVer: 10.0.4302.0 Offset: 000e8736
The code that it is executing I am unsure of. It dies
to
the point that I can't even see my VB editor window and
won't let me bring it up. I am really not too familiar
with using visual basic to program macros. Is there
an "error capturing" utility within the editor so that
I
can know the exact code where it dies each time?
I know that files are not locked by other
people...because there is no one else in these files
nor
should they be in them. However if the macro itself is
locking them this could be an issue. Maybe this really
could be the problem.
Thank you for your help thus far.
If you were to tell us
1) What the errors actually are
2) What code is being called at the time
We might be able to help
It sounds as if you are getting run time errors
opening
the files which could be because they are locked by
someone else editing them or some other process which
exclusively locks them but without further
details ....
Keith
.
.