G
Greybeard
I have a userform with 4 textboxes for 4 different sets of numerical
data, which are then processed to give a result.
The basic code for each is:
Public Sub TextBox1_Change()
Dim current As Single
current = TextBox1.Text
When the correct data is put in all works fine, but if I make a
mistake and use backspace to delete the entry so I can put in the
correct numbers I get a "Run Time error 13, Type mismatch", when the
first number is deleted (ie the last to be removed by the backspace).
The debug highlights the current = terxtbox1.text line but that's it.
Can anyone please put me right so I can just change the numbers by
backspace?
Thanks
Tony
data, which are then processed to give a result.
The basic code for each is:
Public Sub TextBox1_Change()
Dim current As Single
current = TextBox1.Text
When the correct data is put in all works fine, but if I make a
mistake and use backspace to delete the entry so I can put in the
correct numbers I get a "Run Time error 13, Type mismatch", when the
first number is deleted (ie the last to be removed by the backspace).
The debug highlights the current = terxtbox1.text line but that's it.
Can anyone please put me right so I can just change the numbers by
backspace?
Thanks
Tony