Seguendo il tuo consiglio ci sono riuscito!
Grazie Oregon![]()
In caso servisse ad altri vi posto l'esempio che ho trovato:
You can select all text in a Text Box by setting SelStart to 0 and SelLength to the length of the text. Here's a short procedure that does this:
Sub SelectAllText(tb As TextBox)
tb.SelStart = 0
tb.SelLength = Len(tb.Text)
End Sub
Then, for each Text Box that you want to behave this way, call the procedure from the GotFocus event procedure, passing the name of the Text Box as the argument:
Private Sub Text1_GotFocus()
SelectAllText Text1
End Sub
This works when the Text Box gets the focus either by tabbing or by a mouse click.
![]()

Rispondi quotando