ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   To save and close (https://www.excelbanter.com/excel-worksheet-functions/37011-save-close.html)

Steved

To save and close
 
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.

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



"Steved" wrote in message
...
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.




Steved

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.

"Anne Troy" wrote:

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



"Steved" wrote in message
...
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.





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



--
HTH

Bob Phillips

"Steved" wrote in message
...
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.

"Anne Troy" wrote:

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



"Steved" wrote in message
...
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.







Steved

Hello Bob from Steved

Thankyou.

"Bob Phillips" wrote:

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



--
HTH

Bob Phillips

"Steved" wrote in message
...
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.

"Anne Troy" wrote:

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



"Steved" wrote in message
...
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.







Bob Phillips

Hello Steved from Bobp

You are welcome <g

"Steved" wrote in message
...
Hello Bob from Steved

Thankyou.

"Bob Phillips" wrote:

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



--
HTH

Bob Phillips

"Steved" wrote in message
...
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.

"Anne Troy" wrote:

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



"Steved" wrote in message
...
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.










All times are GMT +1. The time now is 11:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com