Hi Everyone,
I'm doing a job on geological data. There are many tab delineated text files that I wish to process in order to make them easier for me to put into a database.
I've written a macro in excel that arranges the tab delineated text files into several sheets in a workbook.
This macro was written so far using combination of the record macro option, adding code from the help dialogues and trial and error in order to custom my Macro. I had managed to get my macro working with one of my worksheets without any error. Then, I started using different files to test it out and then discovered the runtime error 91 here in the Debugger.
I tried to fix the Macro code with some short lived success and now it won't even work on my original text file because of the RunTimeError91.
In my Macro the offending code is this:
For some reason, the Debugger will give me a Runtime Error 91 and then sometimes not.
I have help checked it. I am unsure as to what Object I haven't defined, plus I haven't used any With statements in my Sub code.
This is the main Code here...
Here is an image of the worksheets that I'm working with:
datafile to split.PNG
Essentially, I just want the Cells.Find part of my Macro to be able to find the H1000 Cell and the first D Cell in the Worksheet without giving an error.
I hope that someone can help here. I offer much gratitude and good vibes to anybody who can.
Thankyou ExcelForum,
Sator
Bookmarks