Re: Code looping through files



Since you don't show the code, have him send you the file that fails to open
and test the code with that file. Perhaps the file is damaged or not a file
Excel will open.

--
Regards,
Tom Ogilvy

"Otto Moehrbach" <ottokmnop@xxxxxxxxxxx> wrote in message
news:%23vP3hpSLHHA.4848@xxxxxxxxxxxxxxxxxxxxxxx
Excel XP & Win XP
I'm helping an OP with a project. The code loops through all the files in
a folder, opens each, does things, closes the file and opens the next
file, etc.
The code is placed in the Personal.xls file. It works fine for me. It
fails on opening the first file for him (will not open the file). An
error is produced saying that opening the file failed. He has Excel 2003.
He sent me his Personal.xls file. I changed the name and put it in my
XLSTART folder. It works fine with my path. I created his path on my
computer and that works fine too.
I checked the VBE - Tools - References. The only thing I have checked
that he doesn't is "Microsoft Forms 2.0 Object Library". He doesn't have
anything like that to check.
Does anyone have any ideas of what I could do? Thanks for your time.
Otto




.



Relevant Pages

  • Re: is file exist
    ... download it to a hardware. ... it fails it doesn't give me any clue why it fails. ... That seems a well suited task for the "open for reading and try reading ... If it opens and your read succeeds, ...
    (microsoft.public.vc.language)
  • Re: is file exist
    ... write my code that consists of opening it and if opening fails, ... checking success is what you are supposed to do. ... so open it for reading and read (if it opens). ... The problem with this function is that if it fails it ...
    (microsoft.public.vc.language)
  • Problem using internetexplorer object to open a url
    ... password-protected area but everything I have tried fails. ... The navigate method fails with a url such as "http:// ... Can anyone provide a code snippett that opens page and hands over the ...
    (microsoft.public.excel.programming)
  • RE: Automating Excel with straight C++ (No MFC)?
    ... "input" and produce your output to that sheet or another sheet. ... Curiously, I have code which opens the existing file using some raw code, ... but when I try to use the handy AutoWrap function, that fails. ... VARIANT vArgsOpen; ...
    (microsoft.public.win32.programmer.ole)
  • Re: recovery tool
    ... If OE is not opening, its usually due to a corrupt folders.dbx file. ... that and then see if OE opens. ... Because of this tendency of attachments to infect, ... Turn off email scanning in your antivirus software. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)