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!

Having Problems Activating a Worksheet

Status
Not open for further replies.

tudor30

Technical User
Jan 7, 2004
49
US
Debugging... I've tried the following combinations WITHOUT success to Activate a named sheet from ECN Navigator.xls

Workbooks(strECNN & "D0_Face.xls").Activate
Set f = ActiveSheet
Workbooks("ECN Navigator.xls").Activate
Worksheets("ECN Face Page").Activate
Set t = ActiveSheet
(Produces Run Time Error 9 - Subscript out of range and highlights the last line, ie Worksheets("ECN....

Next attempt:
Workbooks(strECNN & "D0_Face.xls").Activate
Set f = ActiveSheet
Workbooks("ECN Navigator.xls").Sheets("ECN Face Page").Activate
Set t = ActiveSheet
Same Error Message as Above

any suggestions?
John
 
hi,

Worksheets("ECN Face Page.xls").Activate

BUT...

why all this activating and selecting??? Don't need to do that nor should it be done in most cases.

faq707-4105 How Can I Make My Code Run Faster?

:)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
OOPS. it was a worksheet, wasn't it.

Are you sure the worksheet name is correct? Probably is NOT!
Code:
Set f = Workbooks(strECNN & "D0_Face.xls").ActiveSheet 
Set t = Workbooks("ECN Navigator.xls").
Worksheets("ECN Face Page")


Set f = Nothing
Set t = Nothing
Personally, I try NOT to use spaces in folders and file names :)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top