ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto Open sheet function (https://www.excelbanter.com/excel-programming/339324-auto-open-sheet-function.html)

wilro85[_4_]

Auto Open sheet function
 

I'm curious, is it possible to set a program to run each time a sheet i
accessed? I imagine it would be similiar to:

Private Sub Workbook_Open()
End Sub

Perhaps:

Private Sub WorkSheet("name")_select()
End Sub

etc...

Is this a do able task

--
wilro8
-----------------------------------------------------------------------
wilro85's Profile: http://www.excelforum.com/member.php...fo&userid=2693
View this thread: http://www.excelforum.com/showthread.php?threadid=45139


Rowan[_4_]

Auto Open sheet function
 
Right click the sheet tab in question and select View Code. Then:

Private Sub Worksheet_Activate()
'your code here
End Sub

Hope this helps
Rowan

"wilro85" wrote:


I'm curious, is it possible to set a program to run each time a sheet is
accessed? I imagine it would be similiar to:

Private Sub Workbook_Open()
End Sub

Perhaps:

Private Sub WorkSheet("name")_select()
End Sub

etc...

Is this a do able task?


--
wilro85
------------------------------------------------------------------------
wilro85's Profile: http://www.excelforum.com/member.php...o&userid=26935
View this thread: http://www.excelforum.com/showthread...hreadid=451397




All times are GMT +1. The time now is 07:14 PM.

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