View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
K Dales[_2_] K Dales[_2_] is offline
external usenet poster
 
Posts: 1,163
Default On activate event

In ThisWorkbook (since it is a workbook event)
--
- K Dales


"SHIPP" wrote:

I want to run a procedure when a user clicks on a worksheet. The code should
be something like

Private Sub workbook_SheetActivate(ByVal Sh As Object)
MsgBox Sh.Name
End Sub

I've tried putting this in a module and underneath the sheets to no avail.
Where should I put this code if I want it to run when a worksheet is clicked
and active?
--
M. Shipp