VBA - How to Set Cursor in a Specific Position in a Textbox?

*爱你&永不变心* 提交于 2019-12-04 08:40:12

Use the SelStart property of the TextBox object:

Me.TextBox1.Value = "()"
Me.TextBox1.SelStart = 1

Note: SelStart=1 means the cursor will be after the first element, i.e. "(". You should hence play with your string to understand what your desired value of SelStart property should be.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!