Activate macro globaly

  • Thread starter Thread starter CAM
  • Start date Start date
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
 
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
 
Back
Top