Activate macro globaly

C

CAM

Hello,

I have about 50 2003 Excel reports and all of the has a command button(s)
that erases numbers in a define column and fields. I have two command
buttons. There each worksheet has aleast one command button. Now the
command buttons names are the same for all 50 reports. For example -
command button one is call "cmdClear1" the second command button is call
"cmdClear2". Not all 50 reports has two command buttons only a handfull has
c"cmdClear2" command button. What I like to do is have a macro in an
seperate Excel workbook and press a command button that will activate the
"cmdClear1" and "cmdClear2" command button within a folder. Is this
possible? Any tips will be appreciated. Thank you in advance.

Cheers
 
S

Scoops

Hello,

I have about 50 2003 Excel reports and all of the has a command button(s)
that erases numbers in a define column and fields. I have two command
buttons. There each worksheet has aleast one command button. Now the
command buttons names are the same for all 50 reports. For example -
command button one is call "cmdClear1" the second command button is call
"cmdClear2". Not all 50 reports has two command buttons only a handfull has
c"cmdClear2" command button. What I like to do is have a macro in an
seperate Excel workbook and press a command button that will activate the
"cmdClear1" and "cmdClear2" command button within a folder. Is this
possible? Any tips will be appreciated. Thank you in advance.

Cheers

Hi CAM

You can add macro buttons to your Excel toolbars and assign macros to
them thus:

Have the workbook containing the desired macro open, right-click a
toolbar > Customise > Commands tab > Macros > drag the Smiley to the
required position > right-click the Smiley > Assign macro (and change
the name, icon etc).

Clicking the macro button will open the workbook and execute the
macro. The called workbook will remain open so you may want to add:

ThisWorkbook.Close 0

before your End Sub to close it (with no changes) once the macro has
finished.

Regards

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top