ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selecting All Text in TextBox (https://www.excelbanter.com/excel-programming/327268-selecting-all-text-textbox.html)

DRKML

Selecting All Text in TextBox
 
When I open a form I want to have the all of the text in the first control
selected. If I SetFocus the cursor is at the end of the text.

How can I have all of the text selected?



Robert Bruce[_2_]

Selecting All Text in TextBox
 
DRKML wrote:
When I open a form I want to have the all of the text in the first
control selected. If I SetFocus the cursor is at the end of the text.

How can I have all of the text selected?


Hi,

Take a look at the SelStart and SelLength properties of the textbox object.

Rob




All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com