Assign Macro to Button

sswcharlie

New Member
Joined
Jun 26, 2005
Messages
45
Office Version
  1. 2016
Platform
  1. Web
Hi

Excel 2000 Win7


I have done actions as per instructions on this site. Put Button into the Toolbox menu.

However when I use it opens ok, but the 'Assign Macro' message does not show up. I then have to cut and paste the code.

How do I get the 'Assign Macro' to appear ?

Thanks

Charlie
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Welcome to the Board!

It sounds like you may have use an ActiveX control, which requires direct coding, instead of a Forms control.

If you see: Private Sub CommandButton1_Click() you'll know for sure. But you can just call the code from there if you want:

Code:
 Private Sub CommandButton1_Click() 
  macro1
End Sub

Or try redrawing the button from the Form Toobox and you should get the Assign Macro dialog.

HTH,
 
Upvote 0
Hi Smitty


That sounds good advice. I will follow thru.

Thanks for instant service.

Regards

Charlie
 
Upvote 0
Hi Smitty

All sorted and working fine. Have the Assign Macro box appearing.

Thanks

Charlie
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,911
Members
452,949
Latest member
beartooth91

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