I have a textbox "txtNum" with the following codes
Private Sub txtNum_GotFocus()
txtNum.Text = Format(txtNum.Text, "General Number")
End Sub
Private Sub txtNum_LostFocus()
txtNum.Text = Format(txtNum.Text, "Standard")
End Sub
Now, when I click the text box, thus it gets focus, it is formatted as expected. However, the cursor is always at the beginning of the text.
How can I set the cursor position to where I click?
Private Sub txtNum_GotFocus()
txtNum.Text = Format(txtNum.Text, "General Number")
End Sub
Private Sub txtNum_LostFocus()
txtNum.Text = Format(txtNum.Text, "Standard")
End Sub
Now, when I click the text box, thus it gets focus, it is formatted as expected. However, the cursor is always at the beginning of the text.
How can I set the cursor position to where I click?