Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel UserForm displays at the wrong size

I'm having a very strange issue with Excel UserForms; when I display a form by clicking a command button in my worksheet, the size of the form warps significantly, making it essentially unusable. The below images illustrate this.

Form before size warping (intended size) Form before size warping (intended size)

Form after size warping Form after size warping

I work with a multiple screen setup, and this sizing issue only occurred at first when just using my laptop without the additional displays; however, it has now started occurring even with my usual setup. Furthermore, in some cases, the warping compounds with each subsequent form initialization. I've included example images of this below.

Form before warping (intended size) Form before warping (intended size)

Form after warping (first iteration) Form after warping (first iteration)

Compounded warping (second iteration) Compounded warping (second iteration)

Further compounded warping (third iteration) Further compounded warping (third iteration)

I've tried setting the height and width properties manually, both through the properties window and through the Userform_Initialize() event, but still end up with strange results. In the properties window, the values I enter for height and width are automatically changed after I enter them, usually resulting in undesirable aspect ratios, and a similar thing happens when I try to resize with VBA. I don't think the code is the issue, as I'm simply setting the .Height and .Width properties so there isn't much room for error.

I've done relatively extensive research and haven't been able to find any information about this issue. I'm using Excel 2016; any help would be appreciated!

like image 814
Chris McCulloch Avatar asked Jul 25 '18 21:07

Chris McCulloch


1 Answers

I think your issue might be related to mine here.

@Lance Phillips: the option you are referring to (image below found on the web) is missing on my side with Excel 2016 32-bit Windows 10 64-bit. I have no idea why. Even with an extra monitor connected.

enter image description here

Edit: apparently this is a new feature from Office build 9330.1000, see here.

like image 139
hymced Avatar answered Sep 21 '22 07:09

hymced