Excel工作表上的ActiveX文本框控件文本 [英] ActiveX Text Box Control Text on Excel Worksheet

查看:844
本文介绍了Excel工作表上的ActiveX文本框控件文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在VBA中,如何在Excel工作表上访问ActiveX文本框控件的文本值?

In VBA, how do I access the text value of an ActiveX text box control on an Excel worksheet?

谢谢。

推荐答案

您可以使用 ActiveSheet.TextBox1.Text 设置或获取ActiveX文本框控件的内容。

You can use ActiveSheet.TextBox1.Text to set or get the contents of an ActiveX textbox control.

如果您有一个以上的ActiveX文本框页面,您可以使用 ActiveSheet.OLEObjects(boxname)。Object.Text 设置或获取其内容。 boxname是引号中的框的名称;或没有引号,您为其分配了文本框的名称的字符串变量;或框的对象编号。

If you have more than one ActiveX textbox on a page, you can use ActiveSheet.OLEObjects("boxname").Object.Text to set or get its contents. boxname is the name of the box in quotes ; or with no quotes, a string variable to which you have assigned the name of the textbox; or the object number of the box.

请参阅 Microsoft文档获取更多信息。

这篇关于Excel工作表上的ActiveX文本框控件文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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