ActiveX控件 - 命令按钮和列表框自动调整大小 [英] ActiveX Control - Command button and listbox auto resize

查看:603
本文介绍了ActiveX控件 - 命令按钮和列表框自动调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个关于ActiveX控件 - 命令按钮和列表框的问题。我在Excel 2010中构建了一个表单,它看起来很好,但是命令 按钮和列表框将在以下情况下自动调整大小:

I have a problem regarding the ActiveX Control - Command button and listbox. I built a form in Excel 2010 and it looks fine, but the command button and listbox will be auto resized in following circumstances:

1. 当笔记本电脑连接到投影仪时

1. When the laptop connecting to a projector

2。当文件由office 2007打开时

2. When the file is opened by office 2007

您是否有任何原因和解决方案的线索?

Do you have any clues of the cause and any solutions?

谢谢,

推荐答案

这是您创建的Userform还是您在工作表上创建了表单?

Is this a Userform that you created or you created a form on a worksheet?

如果在工作表上,如果"缩放"未设置为100%,则调整控件大小是一个已知问题。

If on a worksheet, then the resizing of controls is a known problem if the Zoom is not set to 100%.

或者,您可以在工作表的Activate事件中使用VBA代码将所有控件调整为所需大小。我以前使用隐藏的工作表来存储基于TopLeftCell加上高度和宽度的位置。

Alternatively you can use VBA code in the worksheet's Activate event to resize all controls to the required size. I have previously used a hidden worksheet to store the position based on the TopLeftCell plus the height and width.


这篇关于ActiveX控件 - 命令按钮和列表框自动调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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