Strange format problem with textbox

  • Thread starter Thread starter staeri
  • Start date Start date
S

staeri

I've found a strange format problem when I enter a value in a textbox
on a form.

If I enter value 5,5 in the textbox on the form, it is saved as value
5,5 in cell L14.
If I enter value 5.5 in the textbox on the form, it is saved as value
5,5 in cell L14.

The problem is that I can use the value in L14 in a sum function in the
second alternative, not in the first, although it looks like they are
saved as 5,5 in both cases.

This application is going to be used by people all over the world with
both decimal and dot separators so I have to find a generic solution
for both.

Can anyone help me with a solution?

// S
 
I don't have my system setup with comma as the decimal separator but I tried
to do it the other way and couldn't.

Couple of questions.

Are you seeing a number or text in that cell?

Can you post your code that does it?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Hi S

Just a suggestion:
why don't you replace any , with a . before you
save the value to the cell?

Hth

Carlo
 
Hello,

I'm using this code and I see the number:

Range("O" & (lngSelectedObjective + 14)).Value = txtValue.Text

Can I really trust that it will work on all machines with . if I
replace it?

// S


Carlo skrev:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top