View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Calling a macro from Worksheet--Activate

Private Sub Worksheet_Activate()
Call MacroToRunHere
End Sub

The Call is actually optional. I like to use it.

But you could use:

Private Sub Worksheet_Activate()
MacroToRunHere
End Sub



Fatz wrote:

Hi-

I have a macro that I want to run when a worksheet is activated.
Problem is I do not know how to call it. When I call a function
(Let's say the name is FUNC1) within a macro I just type FUNC1. I am
attempting the same idea on the macro and am having no success.

I'm sure there is a simple solution to this that I am overlooking.
Can someone please help me fill in the blanks??

Private Sub Worksheet_Activate()

MACRO TO RUN HERE. HOW DO I CODE IT?

End Sub

Thanks!
Chris


--

Dave Peterson