View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Toby Toby is offline
external usenet poster
 
Posts: 19
Default error 9 'subscript out of range' using workshhets function

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.