I am having trouble with the following script.
I have been trying to assign a macro to it but I just can't work it out.
I want to assign a macro named "Form1" to the control and then when I close my workbook it would delete the button.
I have tried the .onaction script but can't get it to work.
Also can someone provide a script the same but rather than the control button in the script below it would add a button named "Form2" with the macro named "Form1" assigned to it.
Thank You
I have been trying to assign a macro to it but I just can't work it out.
I want to assign a macro named "Form1" to the control and then when I close my workbook it would delete the button.
I have tried the .onaction script but can't get it to work.
Also can someone provide a script the same but rather than the control button in the script below it would add a button named "Form2" with the macro named "Form1" assigned to it.
Code:
Application.CommandBars("Worksheet Menu Bar").Controls.Add Type:= _
msoControlButton, ID:=1183
Thank You