Dave Peterson said:
I wouldn't guess so--but that's just a guess.
I'm still guessing that it's something simple--like a locked file. ***
none of the files are locked or protected.
If you create a separate procedure in a test module:
*****No because what we're trying to do is go down the directory of .xls
files and open, do the procedure and then close -- move to next one and redo
the procedure until all files (approx 22) have had the code run on them and
it's completed.
I will add that if I take this portion (where the error occurs) of the code
out of it, the code runs perfectly on each file operated independently but
it requires me to run it on each one individually.
Option Explicit
sub Testme01()
dim myName as string
dim wb as workbook
myName = "C:\Documents and Settings\Owner\Desktop\KathleenFolder\asf.xls"
set wb = workbooks.open(myname)
End sub
===
I don't think that this will help...
But if you move that asf.xls file to a different location, does the
original
procedure work ok?
I can't imagine what can be happening where you can open this file
manually, but
have problems when you open it via code.
It will open by single code, like I said, but once we try it through the
loop he hangs up right there. Otto has it working fine (With the same files)
on his computer and I even transferred all my miles and code to another
laptop I have running windows xp pro and office 2003 with the same exact
results I get. That's why I was thinking it might be a setting on my
computer...Again, if it works on other computers that would tend to isolate
mine as the cause. Is there any reasons that you can think of..... Lastly
do you think removing and reinstalling office would help. I can't see where
it would since all features are installed, but I don't know enough to make a
really educated guess....
Thanks
Bob Reynolds