PC Review


Reply
Thread Tools Rate Thread

Convert input to numeric

 
 
staeri@gmail.com
Guest
Posts: n/a
 
      7th Nov 2006
I have a very difficult problem that seems to be to hard for me to
solve. We use VBA forms with textboxes for input.

I'm in need of a converting function which works in all countries,
especially regarding decimal sign and thousand separator.

If I'm in Sweden where we use "," as decimal sign I want to be able to
also use "." and convert this to a numeric value.

If I'm in US where we use "." as decimal sign I want to be able to also
use "," and convert this to a numeric value.

The reason why I want to allow both signs is that the entered value is
used for other calculations so I need it to be numeric.

All kinds of help is very appreciated!

Regards,

SE

 
Reply With Quote
 
 
 
 
Ken Johnson
Guest
Posts: n/a
 
      7th Nov 2006

(E-Mail Removed) wrote:
> I have a very difficult problem that seems to be to hard for me to
> solve. We use VBA forms with textboxes for input.
>
> I'm in need of a converting function which works in all countries,
> especially regarding decimal sign and thousand separator.
>
> If I'm in Sweden where we use "," as decimal sign I want to be able to
> also use "." and convert this to a numeric value.
>
> If I'm in US where we use "." as decimal sign I want to be able to also
> use "," and convert this to a numeric value.
>
> The reason why I want to allow both signs is that the entered value is
> used for other calculations so I need it to be numeric.
>
> All kinds of help is very appreciated!
>
> Regards,
>
> SE


Hi SE,

You might be able to make use of the example in VBA Help under
"DecimalSeparator Property"

Ken Johnson

 
Reply With Quote
 
Ken Johnson
Guest
Posts: n/a
 
      7th Nov 2006

Which is a property of the Application object (I left out)

Ken Johnson

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Input mask for text box to enforce numeric input and right adjust. karl dewey Microsoft Access Form Coding 0 27th Feb 2009 11:58 PM
Input mask for text box to enforce numeric input and right adjust. ThomasAJ Microsoft Access Form Coding 0 27th Feb 2009 09:26 AM
Numeric in Text to convert back to the form of Numeric for VLookup Purposes achilles Microsoft Excel Misc 4 6th Feb 2006 07:05 AM
How to convert numeric fields in an input line? news.west.earthlink.net Microsoft C# .NET 4 15th Mar 2004 11:37 AM
how to get numeric input in winForm Sam Microsoft C# .NET 2 12th Sep 2003 11:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:44 PM.