Marcar texto de un text

Desde ya gracias, mi consulta es la siguiente:
Si yo tengo un texto en un text y accedo a este mediante el tabulador, como puedo hacer para que cuando este text este en el evento getfocus, se marque el texto completo contenido, así yo poder modificar este sin tener que borrar carácter por carácter, espero me entiendan. Gracias.

1 Respuesta

Respuesta
1
Pues aquí lo tienes:
'Para un control
Private Sub Text1_GotFocus()
Text1.SelStart = 0
Text1.SelLength = Len(Text1)
End Sub
'Para un array
Private Sub Text1_GotFocus(Index As Integer)
Text1(Index).SelStart = 0
Text1(Index).SelLength = Len
(Text1(Index))
End Sub
Suerte y espero que te sirva.

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas