Excel resizing buttons and fonts when display scale is not 100% - excel

I have a sheet with VB buttons (using Form controls or ActiveX controls makes no difference).
When the display scale in windows is not 100%, after a button is down it resizes to something not the same size, as shown below (Export Forecast Data... button). When a different button is clicked, it pops back to normal size and the new button then gets this effect.
What you see below is 125%, but the bigger the scale, the worse it gets. In addition, as you can see, it is changing font sizes too.
If I save then reload, all buttons pressed end up resized to the smaller size they were after being clicked and do so badly, as third screenshot.
I have tried on many computers and they all have the same fault.
These have been Excel Office 365/2016.
Any ideas how to fix this? Also, I believe this may be linked to not just a scaling, but having two displays, one at 100% and the other at a different scale.
The effect of the resize after saving

Related

Why does Excel 2010 VBA userform textbox font changes depending on size of frame?

I have a userform with several frames, labels, and textboxes, all set to a default font of Calibri Regular size 10. I noticed the font in one textbox was different than the rest; a bit slimmer, a hair shorter and more condensed than the default. I tried adjusting the font in design and runtime, messing with the font of the frame, and replacing the textbox with a new one, but nothing seems to correct the font.
Then, by accident, I moved the textbox position up a bit and the font automagically corrected itself. Weird. I've since been playing around with the textbox position and frame size. This is what I've observed:
1) The font size is dependent on the relative position within the frame; the textbox needs to be entirely in the top 50% of the frame height, and adjusting the textbox position OR frame height affects the font.
2) This issue applies to more than one frame on this userform.
3) This issue applies to labels as well as textboxes.
4) This issue is inconsistent and does NOT apply to all textboxes and labels; it's just the textboxes affected in the first frame, just the labels in a second frame, and there is no font issue in a third frame.
I've gone over the properties in all frames, labels, and textboxes in design mode and nothing stands out. All of these controls have the same font set. Has anyone ever encountered this issue before? Is this a known bug?
Same as #SquirrelBait - I too have found that the display size of the font changes in appearance depending on where it is positioned on my UserForm (created at Design time - Excel 2016). This occurred within a Multipage, but may not be relevant.
Although I don't have a solution, I may have a possible work around:
The issue only seems to occur where the Height of the Form Control (Label, TextBox, ComboBox) isn't an integer value. I auto sized some of my Controls so they were given Heights of 14.25, 28.5, 20.25 etc. I've increased all the Heights to integer values. Now the issue appears to be resolved.
I also had success changing my textbox heights from 17.5 to 18. In my case I also had them slightly overlapping (to create a table effect), which despite them being 18 font, still caused them to have a slightly larger text size. After I changed it so that the bottom of one is the top of another, everything seems to be working fine now.

Auto fit a non activex userform shapes and boxes to different screen sizes?

Challenge
Userform pictures/shapes and textboxes does not fit to different screen sizes.
I have different users with different desktop/laptop screen sizes
Misconception
I don't want to fit userform itself, I just want to fit objects(combobox/pictures) instead.
What I have tried
I tried to convert it to an active x form (to fix the shapes regardless of the screen size) instead but it would take a long time to rename shapes and re-write the code. (Not time efficent)
I tried to fix the width, top, height, disable/enable auto fit for all objects as well as userform, but still don't fit.
I tried to recognize the screen size and then fit objects, not time efficient
I need to fit shapes inside a non active x userform to fit all screen sizes, any ideas?
It worked only when I converted the USERFORM (Code & Design) to ActiveX Form (Worksheet).
Only thing to change from (ME.Object Name) to (Thisworkbook.worksheets("Name").ObjectName)
It took some time but worked finally.

Avoid distortion and wrong scaling of shapes and objects when printing Excel worksheets

Excel distorts shapes ans objects when printing.
A spreadsheet with several objects (Active-X-Radio Buttons and other) and programatically created shapes (Lines, arrows and rectangles as seen above the word 'System') should be printed as such:
Sometimes however, assumingly when the memory is low, excel distorts the layer holding all graphical objects.
In the printout these objects are completely out of size:
The bug occurs randomly and independent of the way, the sheet is printed. Either programatically saved as PDF or manually printed using the print dialog.
Yes, unbelievable, the zoom level of the active window is responsible for this behaviour.
Put Zoom of the excel page at 100% and the pictures are wrong and distorted. Put 99% and it's perfect. It sounds crazy but it works.

Excel Font Size variations in List Box

My code populates an Excel Form by building various labels and listbox controls into a Frame.
It positions the controls at run time depending on the data to display.
This works fine most times but sometimes a list box font appears larger, cutting off some of the text.
Various things, back colour, frame height, list height can all have an effect on the size but I cannot find a reliable pattern.
It does not help that Excel will report it is the font size set, even though it's not that size
I'm hoping some can help me cannot detect when this happens and that lead to a fix. I have tried for several years without success.

Excel ActiveX labels blink / change style upon clicking

This, what seems to be a glitch, has annoyed me for years. Some ActiveX controls, when placed on the worksheet, do odd things when clicked. In the picture below, there is no code whatsoever and Label1 is disabled, but when Label1 is clicked, Label2 disappears. I've also seen dark labels turn white upon clicking. The only way I know of to prevent this would be to use subclassing/hooking to intercept and cancel wm_mousedown messages when over the label but that is a ton of work for such a simple goal. Does anybody out there have a simple solution for this?
*Edit: I believe what's happening is the z-order/z-index brings the clicked control to the top. But if there's a way to prevent this I would love to know how.
Here is an example of the background color changing when a label is clicked. See the label with the caption "Original Value:"
Items should stay in the order they were laid out in, I have many projects with overlapping menus, shapes and labels and they all stay in the layer order they are organised in, the only time they move is if you programatically recreate them to update menues etc, then you need to write code to put them all back in order starting from the bottom up. If they are not staying in order then there is a problem and not a design flaw.

Resources