ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Focus On Open - Goto (https://www.excelbanter.com/excel-worksheet-functions/252357-focus-open-goto.html)

chickalina

Focus On Open - Goto
 
I am trying to figure out a way to do this in Excel.
I would like the focus to be on the first cell of the first worksheet when
the workbook is opened - every time.
Can this be done in VBA?
Thanks for any help.

Mike H

Focus On Open - Goto
 
Hi,

ALT+F11 to open vb editor. Double click 'Thisworkbok' and paste the code
below in on the right

Private Sub Workbook_Open()
Application.Goto Sheets(1).Range("A1")
End Sub

Mike

"chickalina" wrote:

I am trying to figure out a way to do this in Excel.
I would like the focus to be on the first cell of the first worksheet when
the workbook is opened - every time.
Can this be done in VBA?
Thanks for any help.



All times are GMT +1. The time now is 06:36 AM.

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