ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   cursor goto a5 in Sheet1 but (https://www.excelbanter.com/excel-worksheet-functions/36978-cursor-goto-a5-sheet1-but.html)

Steved

cursor goto a5 in Sheet1 but
 
Hello from Steved

The below macro works as I require.
Please If I am working in sheet2 how do I get the cursor please to goto A5

Sub SaveNClose()
ActiveWindow.SmallScroll ToRight:=-25
Application.Goto Reference:=Worksheets(1).Range("A5")
ActiveWindow.SmallScroll ToRight:=-25
ActiveWorkbook.Close True
End Sub
Thankyou.

Steved

Ignore please

"Steved" wrote:

Hello from Steved

The below macro works as I require.
Please If I am working in sheet2 how do I get the cursor please to goto A5

Sub SaveNClose()
ActiveWindow.SmallScroll ToRight:=-25
Application.Goto Reference:=Worksheets(1).Range("A5")
ActiveWindow.SmallScroll ToRight:=-25
ActiveWorkbook.Close True
End Sub
Thankyou.



All times are GMT +1. The time now is 09:51 PM.

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