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 strongm 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 - Window object hidden ?

Status
Not open for further replies.

martindavey

Programmer
Jan 2, 2000
122
GB
Hi,
I get subscript out of range on this command.
When I click on Definition for Windows it says Cannot jump to windows because it is hidden. Is this hidden issue relevant I wonder.

Windows("Weekly Sales Template").Activate

Any help appreciated :O)
 
no workbook with this name, u miss the caption.

try it to get the right caption:

For i = 1 To Windows.Count
MsgBox Windows(i).Caption
Next i

ide
 
Cheers, that helped.
The window did exist, it was called :
"Weekly Sales Template.xls"
It depends on the setting of 'hide well known file types extension'

I've changed the code to:

on error resume next
Windows("Weekly Sales Template").Activate
Windows("Weekly Sales Template.xls").Activate


Now it works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top