Active X Command Buttons increasing in size

scbybee

New Member
Joined
Mar 24, 2017
Messages
8
I'm using command buttons for process control in a spreadsheet. Using vba to enable and disable buttons to keep the user moving along. Each button performs a different vba routine.

Problem I'm having is the buttons resizing themselves with each click. Specifically increasing in size, but the button dimensions remain locked. It's like looking through a window and zooming in more with each click.
I can go into Developer/Design Mode and manually resize the buttons by dragging them out bigger and then returning them to their original size. But when out of Design Mode, the same thing occurs.

Some older posts suggest the problem is with screen resolution - on my workstation monitor it works fine, but unlocking my laptop and using that screen, the problem occurs. So I tried setting monitor and screen to same resolution - but doesn't help.

Various other web remedies havent worked either. Majority of posts on the web are so old, I can't believe this hasn't been fixed - solution found.

Anyway, I could use form control buttons, but I really like being able to help the user through the process by turning on and off command buttons.

Can anyone tell me what's happening to my buttons and how to stop it.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Screen resolution, custom scaling, zooming level etc. Basically wrong calculations.
Most peolpe say something like this incorporated in the button code helps:
Code:
with button 
.width=.width
.height =. Height
End with
 
Upvote 0
Yep - tried that. No workie.

I also tried standard true type fonts to fancy - also no fix.

However - I did find that if I closed the file before I made the switch over to a different monitor or my laptop screen and then opened the file - all works just fine.
Leaving the file open while switching is what gets it confused.

So no fix, but at least I can prevent future embarrassment during presentations of my wonderful clunky code.
 
Upvote 0
Find myself having the same issue and likewise can't believe that this hasn't been fixed yet.

For why it's happening, I have no idea. The screen resolution tips doesn't really apply for me as I am using 1 machine with the same monitor and happens. What I did though was bring it to the front in the shape format options, and that seems to have fixed it for me. No more changing in size for the box or the font.
 
Upvote 0
I have found that setting the workbook change event removes the ability to undo,

so I use worksheet open event. So if the buttons change, you change tab and change back to the document with the command buttons in it.

Change to your buttons.

VBA Code:
Private Sub Worksheet_Open()
ComboBox1.Height = 20
ComboBox1.Width = 250
End sub
 
Upvote 0

Forum statistics

Threads
1,223,155
Messages
6,170,401
Members
452,324
Latest member
stuart1980

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