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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

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
36,730
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,130,112
Messages
5,640,165
Members
417,128
Latest member
Xianter

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