add a command button and assugn a macro to it

sullyman4

Board Regular
Joined
Nov 8, 2004
Messages
151
I can get a command button on my worksheet, it does nothing but sit there. I want to assign a macro to it. How is this accomplished
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
that is not an option when I right click on it. I have the option of
cut, copy, paste, view code, command button object, grouping, order, format control.
 
Upvote 0
on my tool bar I have the button, check box , combo box controls.
I click on the button and then click in the worksheet and the button appears. this must not be the way to do it
 
Upvote 0
Ok Try to select your button and double click it. This will put you in VBA, for a button from Control Toolbox.
Or try the method described by shajueasow
for a button from the Forms Toolbar.

Michael
 
Upvote 0
Sullyman4

It sounds as if you were in Design Mode whilst you were clicking on the macro - if you have the Controls Toolbar open at the same time as you are clicking on the button, you should be able to turn off Design Mode by clicking the Design button on the toolbar.
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

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