Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe use Cdbl to do the converison
dblVal = cdbl(txtbox.value) -- Regards, Tom Ogilvy "Rob F" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Parse delimiter is change from text to numbers | Excel Discussion (Misc queries) | |||
text to columns - break by delimiter | Excel Discussion (Misc queries) | |||
Sum / count data from text string with delimiter | Excel Worksheet Functions | |||
Need Help Importing Text File Using Two or More Spaces as the Delimiter | Excel Discussion (Misc queries) | |||
export excel file as csv with text delimiter of " | Excel Discussion (Misc queries) |