How to set workbook reference - basics
if strPathtoFile is something like "C:\MyFolcer\MyFile.xls" then that is
your problem.
the argument to Workbooks must be of the form Myfile.xls
and Myfile.xls must be open in excel.
Thanks for the reply.
I'm wondering if I need to create a worksheet object first:
Set xlwks = CreateObject("Excel.Sheet")
Is this correct? And then get the workbook like this:
Set xlwkb = xlwks.Parent
I think once I have the objects set, I'll be on the right track. I might
have to go back to early binding otherwise...
|