You can do that with a code like this
where 'MyMacro' is the macro you want to assign...Code:Private Sub Workbook_Open() Worksheets(1).Shapes(1).OnAction = "MyMacro" 'Replace the indices with the name of the worksheet and the chartobject End Sub
You can do that with a code like this
where 'MyMacro' is the macro you want to assign...Code:Private Sub Workbook_Open() Worksheets(1).Shapes(1).OnAction = "MyMacro" 'Replace the indices with the name of the worksheet and the chartobject End Sub
A dream is not something you see when you are asleep, but something you strive for when you are awake.
It's usually a bad idea to say that something can't be done.
The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve
Join us at Facebook
Bookmarks