error 9 'subscript out of range' using workshhets function

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top