Hi
I have a wordtemplate with a userform. The textboxes in the userform shows a
default text from the beginning for ex the title textbox shows TITLE. My
problem is that when the userform is shown I want the text in the textbox to
be marked, like when you tab between textboxes with text the text is marked
and when you write something you replace the text. I want this behavior also
for the textbox that is first selected. I have tried to do this with setFocus
but it only places the cursor after the text in the textbox.
Thankful for help.

RE: setFocus on textbox in userform by HelmutWeber

HelmutWeber
Mon Mar 13 04:25:17 CST 2006

Hi Lina,

With MyBox1
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With

--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000