To save and close

G

Guest

Hello from Steved

I work in Sheet1 or Sheet2

What formula will put the cursor on cell A5 in both sheets then Save and
Close, so that when a person opens the file they will see the worksheet from
Column A.

Thankyou.
 
A

Anne Troy

Hi, Steved. The best way I can tell you to do this...
For one, I wouldn't bother doing it on close. Do it on open instead. This
macro will, whenever you click any worksheet tab, take you to the cell of
that worksheet:
http://www.vbaexpress.com/kb/getarticle.php?kb_id=335

So, just change: Sh.Range("A1").Select
To: Sh.Range("A5").Select

I've seen this same question several times and even answered it once. So,
I'm not sure what's "not okay" about the answer you received last time. I'm
trying another here.
*******************
~Anne Troy

www.OfficeArticles.com
 
G

Guest

Thanks Anne

Yes I tried your Formula Range ("A5") , yes it put the cursor in A5 as I
asked but
the worksheet would stay in the column I was working in ie AA, I needed it
to scroll left also.
 
B

Bob Phillips

Private Sub Workbook_Open()
Worksheets("Sheet2").Activate
Range("A5").Select
Worksheets("Sheet1").Activate
Range("A5").Select
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code
 
G

Guest

Hello Bob from Steved

Thankyou.

Bob Phillips said:
Private Sub Workbook_Open()
Worksheets("Sheet2").Activate
Range("A5").Select
Worksheets("Sheet1").Activate
Range("A5").Select
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top