View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default On going onto a sheet run a macro?

Stu,

You can use the Activate event procedure. For example, put the following
code in the ThisWorkbook code module:


Private Sub Workbook_SheetActivate(ByVal Sh As Object)
MsgBox "You activated: " & Sh.Name
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Stu" wrote in message
...
Is it possible to run a macro when a sheet it clicked on to be viewed?
If so how do I do it?

Thanks
--
Stu