using VBA in Excel it changes the dot of a number to a comma

G

Guest

Hi, when I program on VBA in Excel to show in a dialog (text box or other) a
number from a cell (ex 4.56) it changes the dot for a comma (I will see in
the dialog 4,56) and this doesn't happend viceversa. I run this macro in
other computers and in some of them it worked fine and in others it didnt. I
explained this problem in a VBA forum and they couldn't fine the answer. (all
the regional configuration in windows and in excel is configured correctly
"." for decimal and "," to separate thousands). I think the problem its a non
compatibility issue between a Office and Windows (XP) version

Any help will be appreciated

abygorb
 
G

Guest

You state that in some other computers it did not work fine. Does this mean
that it also produced the 4,56 in the other computers or that the macro would
not run in other computers? If it produces the same results in other
computers, then the problem would be somewhere in the macro code. If it
simply will not run in other computers, it could still be the code. If it
does run properly in the computers that it works in (i.e. produces 4.5) and
your computer is the only one producing 4,5 then the problem is likely in
your computer settings. Happy hunting.
 
G

Guest

The macro runs in all the computers but:

When I run it on computers from the same office where we have the same
windows and office version it produces that problem (it changes the dot for a
comma)

I sent this macro to other people (one of them had Windows 2000 instead of
XP and the second one I think he has XP) and in those cases it worked fine
(it didn't change anything)

I don't know if it has something to do with the language or version of
windows / office

abygrob
 
G

GKeramidas

just a stab, under tools/options/international do you have the correct
settings?

also, which localized versions of the os and office do you have?
 
G

Guest

Hi,

Foolproof way just like :
tval = replace("4,6",",",".")

but doesn't change your comp setting
 

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

Top