Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Showing Group Delimiter in text field

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Showing Group Delimiter in text field

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse delimiter is change from text to numbers ORLANDO V[_2_] Excel Discussion (Misc queries) 11 January 2nd 09 06:56 PM
text to columns - break by delimiter mrl Excel Discussion (Misc queries) 4 April 17th 08 10:16 PM
Sum / count data from text string with delimiter J Excel Worksheet Functions 7 February 21st 07 10:52 PM
Need Help Importing Text File Using Two or More Spaces as the Delimiter [email protected] Excel Discussion (Misc queries) 11 June 13th 06 02:08 AM
export excel file as csv with text delimiter of " John Excel Discussion (Misc queries) 2 May 12th 05 05:50 PM


All times are GMT +1. The time now is 09:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"