
Originally Posted by
Zvoni
You have to use the Add-method of the Workbooks-Collection first to add the Workbook you're trying to access.
Or you can use the Open-Method of the Workbook-Object.
Is there a method to do this without opening the file? I am using this for several files inside an IF cycle... moreover the files are on a network folder...
By the way, I tried this:
Code:
Workbooks.Add (Path)
Set wb = Workbooks(Path).Worksheets(SheetName)
but I get "runtime error '9' - subscript out of range", which is the same error I got before adding "workbooks.add"
what am I missing?