ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sub SaveNClose() (https://www.excelbanter.com/excel-worksheet-functions/34815-sub-savenclose.html)

Steved

Sub SaveNClose()
 
Hello from Steved

If Im working in another sheet but I want it to go the first sheet then save
what is required please to the macro below

Sub SaveNClose()
Application.Goto Reference:="R5C1"
ActiveWorkbook.Close True
End Sub
Thankyou.

Ron de Bruin

Try this Steve

Application.Goto Reference:=Worksheets(1).Range("A5")


--
Regards Ron de Bruin
http://www.rondebruin.nl


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

If Im working in another sheet but I want it to go the first sheet then save
what is required please to the macro below

Sub SaveNClose()
Application.Goto Reference:="R5C1"
ActiveWorkbook.Close True
End Sub
Thankyou.




Steved

Excellent

Thankyou.

"Ron de Bruin" wrote:

Try this Steve

Application.Goto Reference:=Worksheets(1).Range("A5")


--
Regards Ron de Bruin
http://www.rondebruin.nl


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

If Im working in another sheet but I want it to go the first sheet then save
what is required please to the macro below

Sub SaveNClose()
Application.Goto Reference:="R5C1"
ActiveWorkbook.Close True
End Sub
Thankyou.






All times are GMT +1. The time now is 03:13 AM.

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