MacroMania
Programmer
I am experiencing some errors with my program and can not figure out what is going on. I have a VB Program that calls Excel to create a set of workbooks for each given text file in a directory. However, it errors out on 5 textfiles with the following error "Method 'OpenText' of object 'Workbooks' failed. What baffles me, is that I can manually open this file into Excel. So, I tried working around it and opening the files as objects and assigning each tab-delimited value into each corresponding cell. The first textfile opened fine, but the second file gave me the following error "Method 'Cells' of object '_Worksheet' failed". Strangely, when I went to debug the error, I pressed F8 and it still placed the value into the cell. This error occured again on the next 2 files and I was still able to place in the value. However, the last textfile gave me the following errors "Method '_Default' of object 'Workbooks' failed" and when I went to debug, I received the Memory Error Instructions Crash Dialog Box, and Excel Shut down. Anybody got any advice??
Thanks
Thanks