R
Rob F
Hi
I've got a VBA form which has a number of text boxes for entering integers.
However, when inputting 100000 it doesn't look much different from 1000000.
Once the data is processed it's easy to format the number to show e.g
1,000,000 using FormatNumber.
But is there any way to show the number in the box after updating with the
group delimiters, but still retain the underlying value for manipulation once
a command is run?
I tried using:
Private Sub txtBox_AfterUpdate()
txtBox.Value = FormatNumber(txtBox.Value, 0, , -1)
End Sub
This worked fine in the box, e.g. it showed 10000 as 10,000. But when it
came to processing the txtBox.Value was only 10, i.e. it knocked off
everything after the first delimeter.
Any advice much appreciated.
Rob F
I've got a VBA form which has a number of text boxes for entering integers.
However, when inputting 100000 it doesn't look much different from 1000000.
Once the data is processed it's easy to format the number to show e.g
1,000,000 using FormatNumber.
But is there any way to show the number in the box after updating with the
group delimiters, but still retain the underlying value for manipulation once
a command is run?
I tried using:
Private Sub txtBox_AfterUpdate()
txtBox.Value = FormatNumber(txtBox.Value, 0, , -1)
End Sub
This worked fine in the box, e.g. it showed 10000 as 10,000. But when it
came to processing the txtBox.Value was only 10, i.e. it knocked off
everything after the first delimeter.
Any advice much appreciated.
Rob F