Hi all,
I'v got some code that adds a toolbar button to a worksheet.
How do I assign a Sub/macro to this button in the code? Also, I'm currently opening this macro every time the workbook opens, but is it possible to run it only the 1st time the workbook opens?
Here's the macro
And here's the code on the worksheet itself
Can someone help me?
I'v got some code that adds a toolbar button to a worksheet.
How do I assign a Sub/macro to this button in the code? Also, I'm currently opening this macro every time the workbook opens, but is it possible to run it only the 1st time the workbook opens?
Here's the macro
Code:
Option Explicit
Sub AddToolBarButton()
' Add A Tool Bar Button
Application.CommandBars("Reviewing").Controls.Add Type:=msoControlButton, ID:=2950, Before:=12
End Sub
Code:
Private Sub Workbook_Open()
Worksheets(3).Activate
Call StartupNote
Call AddToolBarButton
End Sub
Can someone help me?