Open book on certain sheet and cell


Posted by Corel on July 29, 2001 8:21 AM

Hello all,
I have read numerous answers on this subject, but have
never got it to work properly.If my last work is on sheet
5 and i save and close out i would like the book to open
on sheet 1, cell a1.I mean really open on sheet1 not open
on the last sheet i closed out in and then eventually go to sheet 1
This is what doesn't work:
Private Sub Workbook_Open()
[Sheet1].Activate
[A1].Activate
End Sub
Thank you for any help.
Corel

Posted by LOKMAN on July 29, 2001 9:11 AM

here you go :

Private Sub Workbook_Open()
sheets("Sheet1").Activate
[A1].select
End Sub

Posted by Corel on July 29, 2001 10:01 AM

LOCKMAN,
I have my sheet 1 renamed to Data1, in the explorer
it shows it as Sheet1(Data1)im sure this is why it
doesn't work properly, any ideas? it would be nice to be able to
fix this.
Thanks,
Corel

Posted by LOKMAN on July 29, 2001 10:25 AM

so change it to your sheet name like below..

Private Sub Workbook_Open()
sheets("Data1").Activate
[A1].select
End Sub

regards

Posted by Corel on July 29, 2001 10:40 AM

This is very strange i know the code works because
i've tried it in the past in a new workbook, i just
opened a new book wrote the code renamed the sheets
and it works fine? Like i said in the first responce
it's never worked for me in this particular book.
Thanks for the help,
Corel

sheets("Data1").Activate

: I have my sheet 1 renamed to Data1, in the explorer : it shows it as Sheet1(Data1)im sure this is why it : doesn't work properly, any ideas? it would be nice to be able to : fix this. : Thanks,



Posted by Ivan F Moala on July 29, 2001 6:12 PM

Try;

Private Sub Workbook_Open()
Sheet1.Activate
[A1].Select
End Sub

HTH

Ivan This is very strange i know the code works because i've tried it in the past in a new workbook, i just opened a new book wrote the code renamed the sheets and it works fine? Like i said in the first responce it's never worked for me in this particular book. Thanks for the help,