I have a large workbook and I would like Excel to run a particular macro every time I go to a particular sheet. Does anyone know how? Thanks in advance.
I have a large workbook and I would like Excel to run a particular macro every time I go to a particular sheet. Does anyone know how? Thanks in advance.
Use this :
Private Sub Workbook_SheetActivate(ByVal Sh As Object) 'Your macro End Sub
I did this. It doesn't work. Is there something wrong?
Private Sub Workbook_SheetActivate(ByVal Sh As Object) Application.Run ("a") End Sub
Still no luck. I put this code in the named sheet found in the 'Microsoft Excel Objects' folder on the VBA screen. Is this the right place to put the code? Sorry, I'm learning. Thanks again.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks