Link to home
Start Free TrialLog in
Avatar of Vadimka
Vadimka

asked on

Data in the TextBox with different mask


I want that some textbox(TextBox1) will consist ,for example,any number .And when the form is loading,
this number in the TextBox1 will be paint in "blue"
Like,we want to erase it .
How can I do this?

Thanks
Avatar of vinnyd79
vinnyd79

try this
Private Sub Form_Load()
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
End Sub
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The above example assumes that the textbox will have the focus when the form loads.