Problems with number format 
Author Message
 Problems with number format

As you might know, I am doing some Frontpage VBA development, and the
requirements/challenges are in an "ever evolving" state at the moment.


I am taking some numbers from an Excel-spreadsheet and merging them into
a table in Frontpage. The format of the numbers in Excel is dependant of
the local-settings of the individual client-installation of Excel. This
is fairly understandable - but the problem arises when I do the merge in
Frontpage. The number format in the HTML-pages _must_ be American - e.g.
the number "two thousand one houndred eleven point 45" must be displayed


whereas - with European locale settings - it will be


in the source-data.

But how do I convert them ? - or more specifically, how do I ensure that
the number format of the numbers being inserted into HTML are _always_

I made a small function to convert the dots and commas [1], but this will  
actually also convert correct EN-US numbers to European format - which
was not intended.

I have looked a bit at the Format()-function, but it doesn't seem to fit
my requirements. I think I need some function, that will give me the
numbers in the format given as a input parameter to the function.

Does this function exist ?

Private Function convertToUSFormat(ByVal strCellData As String) As String
    Dim strTmp As String
    strTmp = ""
    strTmp = Replace(strCellData, ",", "[comma]")
    strTmp = Replace(strTmp, ".", ",")
    strTmp = Replace(strTmp, "[comma]", ".")
    convertToUSFormat = strTmp
End Function

Jesper Stocholm
http://www.*-*-*.com/ (online again)
Copenhagen, Denmark

Wed, 23 Mar 2005 23:10:09 GMT  
 [ 1 post ] 

 Relevant Pages 

1. from Microsoft format Number to IEE format Number

2. ADO to Excel number format problem

3. number format problem

4. Problems number formats with ADO and VB6

5. Problems number formats with ADO and VB6

6. Formatting Unformated Numbers in Word to Specific Formats?

7. How to convert number format to date format

8. Problems using format and format$ functions

9. problem with Format and a user defined date format

10. Format Number

11. Special format auto-numbering?

12. "Accounting" Number Format


Powered by phpBB® Forum Software