Run Macro from Toolbar

Smurfit-Stone

Active Member
Joined
Dec 1, 2004
Messages
485
Hello Board,
I have a spreadsheet that is shared between my company and different vendors. I want to attach a macro to it that does come calulations and clears some cells. My problem is that I want the macro assigned to an icon on the users (my companies users only) toolbar. What I have now is on the toolbar, but its on a separate spreadsheet that opens with Excel XLSTART, the problem is that this spreadsheet opens every time Excel is opened. Is there a way to put the icon the macro is assigned to on the toolbar with this separate workbook, or is there a way to get the macro to run as a Private Sub for the active workbook. The macro is listed below.

Private Sub SheetsVisible()
Dim wks As Worksheet
Sheets("Order").Activate
For Each wks In ActiveWorkbook.Worksheets
wks.Visible = True
Next wks
End Sub
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top