error 9 'subscript out of range' using workshhets function

  • Thread starter Thread starter Toby
  • Start date Start date
T

Toby

using workbooks.open filename:="C:\test.xls" I can open successfully open
test.xls
using worksheets("Sheet1").activate activates worksheet 1 of test.xls
however
workbooks("test").activate causes error 9

Any suggestions as to the cause. This code worked fine 2 days ago but now I
get error 9 for most functions and properties of worksheets.

The namespace is correct and the file is open and accessible as proven by
the worksheets function.

Any help/suggestions gratefully received.
 
Back
Top