VBA提示文本中的文本文本框中的文本
如何在userform
中将提示文本添加到textbox
中,该一旦用户键入任何内容就会消失?
How to add a hint text to a TextBox
in a UserForm
that will disappear once a user types anything in?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
标签
元素。BackColor
,高度
,左
,top
和width
属性匹配该属性textbox
将在以后添加。注意:设置
backcolor
窗口背景
(从下拉列表中)将与文本框的常见背景颜色匹配。forecolor
属性(与textbox
文本颜色不同,可以将提示文本与输入的文本区分开)。Textbox
元素。BackColor
,高度
,<代码>左,top
和width
属性。Backstyle
属性属于fmbackStyletRansparent
。sub textbox_change
:这是结果:
Label
element.BackColor
,Height
,Left
,Top
, andWidth
properties to match that of theTextBox
that will be added later.Note: Setting
BackColor
toWindow Background
(from the drop-down list) will match the common background color of a text box.ForeColor
property (a different fromTextBox
text color allows to distinguish the hint text from the entered one).TextBox
element.BackColor
,Height
,Left
,Top
, andWidth
properties.BackStyle
property tofmBackStyleTransparent
.Sub TextBox_Change
:Here is the result: