central update

F

flow23

I have various excel database with macros. All sheets have macros. Is it
possible to have a word file (a central place) where user can click a button
and run those macros?
 
C

CLR

I do it with a separate Sheet in the same workbook called "MainMenu".
Thereon I put "buttons" which I create out of Drawing Objects, include text
to identify which macro each runs, and assign the respective macros to
them..........then on each sheet, I install a similar button titled "Return
to MainMenu".


hth
Vaya con Dios,
Chuck, CABGx3
 
F

flow23

true but thats within the same workbook. I have many different workbooks
which I want to update / run macro from single sheet / word document.
 
C

CLR

Well, I've never done exactly that, but it seems you could do the same thing
with a separate Workbook. Just make local macros in that MasterWrokbook that
will open each respective other Workbook and run a specified macro from
therein, then close that other workbook..........should work the same but
watch out for the possibility of the files being moved and/or MIS doing their
enevitable "changing of directory names".........

Vaya con Dios,
Chuck, CABGx3
 
D

Dave Peterson

What do you mean by this:

All sheets have macros.

Does this mean that you have events associated with various worksheets or that
all spreadsheets(=workbooks) have macros?

If you mean that each workbook has the same macros, you could remove all that
code and create an addin. Then give the user a way to run the common macro--via
options on the menubar or from a toolbar.

If you want to add an option to the worksheet menu bar, I really like the way
John Walkenbach does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)
 
F

flow23

What I meant was that there are various excel books ( workbooks) with
macros in it. There are also menu individually in them.

However, we extract data from other software roughly every 15 days and each
work books has macro that pulls the data and analyse them.

Instead of depending on end user to click the menu button on each workbook.

We in our department would like a word document or excel document that has
buttons which execute macros in this workbooks from one place. (instead of
opening them individually and clicking the button)
 
D

Dave Peterson

If all those macros are the same, then an addin seems like a reasonable
solution.
 
D

Dave Peterson

If the macros have different functions, then I'm not sure a common addin is
better.

But if you have common routines, then you could create an addin that has all the
routines. Then provide that toolbar/menuitem for the user to run the
routine(s).

File|SaveAs
change the "Save As Type" to "microsoft office excel add-in (*.xla)"


All macros have same name (but different function)

but how will I add a ADDIN?
 
A

Art

Flow,

I've done the following as an example:

I created Book2.xls Book2 has the following macro in it:
Sub temp_book2()
ThisWorkbook.Sheets(1).Cells(3, 3) = "abc"
End Sub

I next created Book3.xls. In sheet1 I put a rectangle and added text to it
-- just the word "run", it could of course be anything. Then, right
clicking, under "assign macro", I put: Book2!temp_book2

Now, clicking on that rectangle causes the macro in Book2 to run.

Art
 
Top