Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Biti
 
Posts: n/a
Default Executing macro for all worksheet from a different worksheet

I have a macro that cleans up data types on activate. Once the macro
run on activate then the chart on the first worksheet works fine. But
until the macro gets activated nothing happen on the first worksheet.
There is 7 worksheet and I have this macro execute on each one of the
worksheet. How would I execute this macro the first time the
worksheet is opened? If the user choose to pick any of the worksheet,
I would like the macro to run for all of them. Regardless of which
worksheet is activated. What is the simplest way of doing this? Any
idea is appreciated

Biti
  #2   Report Post  
Vikrant Vaidya
 
Posts: n/a
Default

assign a button to these macros and put the button on every sheet. Else if
the macro is written as seperate module you can insert it directly in the
worksheet. You can even assign a shortcut key. It's in toolsmacro

"Biti" wrote:

I have a macro that cleans up data types on activate. Once the macro
run on activate then the chart on the first worksheet works fine. But
until the macro gets activated nothing happen on the first worksheet.
There is 7 worksheet and I have this macro execute on each one of the
worksheet. How would I execute this macro the first time the
worksheet is opened? If the user choose to pick any of the worksheet,
I would like the macro to run for all of them. Regardless of which
worksheet is activated. What is the simplest way of doing this? Any
idea is appreciated

Biti

  #3   Report Post  
Biti
 
Posts: n/a
Default

Thanks Vikrant,
I do not want the users to do much of clicking. I want them to open
the workbood and see the chart the first time they open. The chart
doesn't get built until the coresponding worksheets are activated. The
macro simply converted the data type to number, until that conversion
is made the chart page would not show any chart. If a user chosse to
open a chart sheet first, i want the macro on the other sheet to
execute so the chart works as it is suppose to. I could send you
example if you want to see it.
Thanks,
Biti

  #4   Report Post  
Vikrant Vaidya
 
Posts: n/a
Default

Ok got it...
See here is how it can be done. Each macro is an event and the macro wont
refresh unless somethings trigers it... like a button click. Anyway if you
want that macro to run when a particular chart gets active... Go to VB script
of that chart (Press alt+f11 and browse to the chart) In the chart script
these lines will automatically appear...

Private Sub Chart_Activate()

End Sub

Just insert the macro you want to be executed in between these lines. That
should do the trick. Also if the macro doesn't run till a particular
worksheet is not activated then use ActiveSheet function...

Vikrant

"Biti" wrote:

Thanks Vikrant,
I do not want the users to do much of clicking. I want them to open
the workbood and see the chart the first time they open. The chart
doesn't get built until the coresponding worksheets are activated. The
macro simply converted the data type to number, until that conversion
is made the chart page would not show any chart. If a user chosse to
open a chart sheet first, i want the macro on the other sheet to
execute so the chart works as it is suppose to. I could send you
example if you want to see it.
Thanks,
Biti


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
Problem executing a macro from different workbook where it is Sergio Calleja Excel Discussion (Misc queries) 1 January 17th 05 12:38 PM
Macro does not run when data refreshed Larry Lehman Excel Discussion (Misc queries) 0 January 16th 05 07:31 PM
Macro to simply bring up the Find dialogue box?? marika1981 Excel Discussion (Misc queries) 14 January 14th 05 10:47 PM
How do I get my personal macro worksheet to open whenever I open . Claudia_R Excel Discussion (Misc queries) 3 December 9th 04 11:59 PM
select worksheet to run macro Hidaya Excel Discussion (Misc queries) 5 December 1st 04 11:54 PM


All times are GMT +1. The time now is 02:02 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"