Active X Command Button Misbehaving

randumhero

New Member
Joined
Feb 21, 2019
Messages
3
Hello All,

First time poster here - maybe there will be a kind soul that can help me with this strange issue.

I was attempting to create a command button to display a userform for a project I'm working on, but was getting some strange behavior out of the button that I couldn't figure out. Instead of messing with it in the project file further, I just tried creating a basic active x command button in a blank worksheet to display a blank userform to see if the behavior was inherent to the project file I was working on... it wasn't - hence my question (see below).



I created a command button with this simple code behind it. This code is contained in the worksheet object.

Private Sub CommandButton1_click()

UserForm1.Show

End Sub

When I click the button the button duplicates itself to the upper left of the original button and disappears upon release of the mouse click. So, clearly it is not initiating the code above... To make matters even stranger, if I enlarge the size of the original button to be large enough that the duplicate overlaps. The duplicate does not disappear upon release; it remains. Further, I can then click this duplicate button and userform1 appears as originally intended.

I am thoroughly confused:confused:... any help would be much appreciated!

Thanks.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Welcome to the site!

Do you have any other code on the sheet or in the userform?

You could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.
 
Last edited:
Upvote 0
No, I dont have the problem. I press the button and it does not duplicate.:confused:

What version do you have of excel?
 
Upvote 0
I get a slight displacement when 1st clicking the button, but it still works. That said, ActiveX buttons are notoriously flaky.
I'd recommend replacing it with a forms control button, or a shape.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,209
Members
453,023
Latest member
alabaz

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