Command buttons created using VBA have no properties...?

wut

Banned
Joined
Dec 13, 2010
Messages
229
When I add a command button using VBA, the button has no properties option in the right-click context menu.

I record myself creating a command button, then play back the recording, and there's no properties option. Can anyone explain this?

How do I access the properties menu of a command button added using VBA?
Code:
    ActiveSheet.OLEObjects.Add(ClassType:="Forms.CommandButton.1", Link:=False _
        , DisplayAsIcon:=False, Left:=381, Top:=157.5, Width:=54.75, Height:= _
        41.25).Select
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

wut

Banned
Joined
Dec 13, 2010
Messages
229
I was in design mode the first time. Try it, you'll see exactly what I mean. Run the code I posted, or record yourself creating a command button.

There's no properties option listed in the context menu. Screenshot.

The button on the left was created from the control toolbox.

The button on the right half od the screenshot was created using the macro recorded as I created the first button.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
38,950
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
It's a bug. Click the Properties button on the Control Toolbox.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,746
Messages
5,855,426
Members
431,731
Latest member
Sagar k

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
Top