Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

subscript out of range message 1

Status
Not open for further replies.

PavelGur

Programmer
Sep 21, 2001
75
I have the following code:
'If Not Windows("SelectCur.xls").Visible Then
If Worksheets("SelectPoliciesCur").Visible = False Then
Workbooks.Open Filename:="c:\Design\SelectCur.xls"
End If
In both cases, commented and uncommented code, I'm getting subscript out of range message.
Thanks in advance, Pav.
 
If you are getting that error with the first line commented out then it means that the worksheet SelectPoliciesCur doesn't exist in the active workbook since
Code:
Worksheets("SelectPoliciesCur").Visible
isn't qualified by a specific workbook reference.

Regards,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top