Thank you all.
I basically want the textbox to behave as a number cell. Like Excel or a datagridview.
But a textbox is designed for text.
I think I figured out a workaround.
HTML Code:Dim EnteringTxtBox As Boolean Private Sub TextBoxes_Enter(sender As Object, e As EventArgs) Handles TextBox3.Enter, TextBox2.Enter, TextBox1.Enter EnteringTxtBox = True End Sub Private Sub TextBox1_Click(sender As Object, e As EventArgs) Handles TextBox1.Click, TextBox2.Click, TextBox3.Click If EnteringTxtBox Then DirectCast(sender, TextBox).SelectAll() EnteringTxtBox = False End If End Sub




Reply With Quote