Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Calling a macro from Worksheet--Activate

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
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
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Calling a macro from Worksheet--Activate

On Mar 5, 5:42*pm, Dave Peterson wrote:
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- Hide quoted text -

- Show quoted text -


Thanks Dave.

So if the macro is named MACRO1, all I type is MACRO1 and it will fire
when the sheet is activated?

Chris
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Calling a macro from Worksheet--Activate

Maybe...

You could do some things that would cause it to fail. But I bet you wouldn't do
those things!

What happened when you did a simple test?

Fatz wrote:

<<snipped

Thanks Dave.

So if the macro is named MACRO1, all I type is MACRO1 and it will fire
when the sheet is activated?

Chris


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
calling macros from worksheet to another NSNR Excel Discussion (Misc queries) 3 October 27th 07 01:49 PM
Worksheet- activate macro sarah Excel Discussion (Misc queries) 3 March 21st 07 04:44 PM
calling worksheet function from a macro Joe Farruggio Excel Worksheet Functions 3 November 20th 06 10:01 PM
calling up information from a different worksheet. Jay Adams Excel Worksheet Functions 0 October 8th 06 09:33 AM
calling macro in a formula rk0909 Excel Discussion (Misc queries) 2 March 14th 06 04:15 PM


All times are GMT +1. The time now is 08:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"