Quote Originally Posted by TnTinMN View Post
As I suspected it would.
That means that there is no cell filled below "A1". Now why is that the case? Either you are referencing the wrong worksheet, or your data in not what you think it is.
This code is assigning the Worksheet on blind faith that the one you want is the first Worksheet in the WorkBook.
Code:
oSheet = oBook.worksheets(1)
You could also specify the WorkSheet name instead of and index.
Code:
oSheet = oBook.worksheets("NameOfWorkSheet")
Open the Workbook in Excel and find out what the first Worksheet looks like.
Your Joking! ((( I have a line of text running in the first row, the rest are empty. Add some text in tow two, it works... I'm sorry for my stupidity.