Excel用户窗体显示大小错误 [英] Excel UserForm displays at the wrong size

查看:95
本文介绍了Excel用户窗体显示大小错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用Excel UserForms时遇到一个非常奇怪的问题;当我通过单击工作表中的命令按钮来显示表单时,表单的大小会明显变形,从而使其实质上无法使用.下图说明了这一点.

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)

尺寸变形后形成

我使用多屏幕设置,只有在仅使用笔记本电脑而没有其他显示器时才出现此尺寸调整问题.但是,即使使用我的常规设置,它现在也开始出现.此外,在某些情况下,翘曲复合以及随后的每个形式都将初始化.我在下面提供了示例图片.

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 after warping (first iteration)

复合变形(第二次迭代)

Compounded warping (second iteration)

进一步复合变形(第三次迭代)

Further compounded warping (third iteration)

我尝试通过属性窗口和Userform_Initialize()事件手动设置height和width属性,但最终还是得到奇怪的结果.在属性窗口中,输入高度和宽度后输入的值会自动更改,通常会导致不良的宽高比,当我尝试使用VBA调整大小时也会发生类似的情况.我认为代码不是问题所在,因为我只是设置.Height和.Width属性,所以没有太大的出错空间.

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.

我已经进行了比较广泛的研究,但是没有找到有关此问题的任何信息.我正在使用Excel 2016;任何帮助将不胜感激!

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!

推荐答案

我认为您的问题可能与我的问题有关

I think your issue might be related to mine here.

@Lance Phillips:使用Excel 2016 32位Windows 10 64位版时,我所缺少的选项(在网上找到以下图片).我不知道为什么.即使连接了额外的显示器.

@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.

显然,这是Office内部版本9330.1000的一项新功能,请参见

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

这篇关于Excel用户窗体显示大小错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆