close

If use a VBA form to fill out data which sometimes have a decimal separator.
In Europe the comma is used as a decimal sign. However when I use a comma the
value is interpreted as a text when the macro places the value in the
spreadsheet. Only when I use the decimal point in the VBA form, the value is
accepted as a value in the spreadsheet.
Does this have to to with the MS Window settings or is it releated to my
english Excel version?
How can a prevent this problem without going into VBA code to tackle it?

Thanks in advance
Jan Bart

You hit it.
You're trying to use European data in a UScentric workbook. Excel looks at
your Windows settings. 3 ways to avoid this are (1) to get your European
counterparts to work in US style (unlikely), (2) to change your settings when
you absolutely have to use their data in their local format, (3) get VBA to
make the adjustments for you.
HTH,--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.quot;Excelerate-nlquot; wrote:

gt; If use a VBA form to fill out data which sometimes have a decimal separator.
gt; In Europe the comma is used as a decimal sign. However when I use a comma the
gt; value is interpreted as a text when the macro places the value in the
gt; spreadsheet. Only when I use the decimal point in the VBA form, the value is
gt; accepted as a value in the spreadsheet.
gt; Does this have to to with the MS Window settings or is it releated to my
gt; english Excel version?
gt; How can a prevent this problem without going into VBA code to tackle it?
gt;
gt; Thanks in advance
gt; Jan Bart

Dear Gary,

The strange thing is that I am working with a Dutch Windows version set to
the European settings!? However I use the English version of Office. In the
spreadsheet it works fine, but the VBA code seems to be based on US
standards?? Is there a way to change this setting? Moreover I have currently
installed the Dutch Office version and the problems remain. So typing eg. 2,5
in a VBA form results in 2.5 in the spreadsheet cell, which is interpreted as
a text.....

Regards,

Jan Bart

quot;Gary L Brownquot; wrote:

gt; You hit it.
gt; You're trying to use European data in a UScentric workbook. Excel looks at
gt; your Windows settings. 3 ways to avoid this are (1) to get your European
gt; counterparts to work in US style (unlikely), (2) to change your settings when
gt; you absolutely have to use their data in their local format, (3) get VBA to
gt; make the adjustments for you.
gt; HTH,--
gt; Gary Brown
gt;
gt; If this post was helpful, please click the ''Yes'' button next to ''Was this
gt; Post Helpfull to you?''.
gt;
gt;
gt; quot;Excelerate-nlquot; wrote:
gt;
gt; gt; If use a VBA form to fill out data which sometimes have a decimal separator.
gt; gt; In Europe the comma is used as a decimal sign. However when I use a comma the
gt; gt; value is interpreted as a text when the macro places the value in the
gt; gt; spreadsheet. Only when I use the decimal point in the VBA form, the value is
gt; gt; accepted as a value in the spreadsheet.
gt; gt; Does this have to to with the MS Window settings or is it releated to my
gt; gt; english Excel version?
gt; gt; How can a prevent this problem without going into VBA code to tackle it?
gt; gt;
gt; gt; Thanks in advance
gt; gt; Jan Bart

lt;the VBA code seems to be based on US standardsgt;

AFAIK, that is indeed the case.

I find suggestion 2 (change your settings) the easiest to work with. After
all, the change only has to be temporarily

--
Kind regards,

Niek Otten

quot;Excelerate-nlquot; gt; wrote in message
...
gt; Dear Gary,
gt;
gt; The strange thing is that I am working with a Dutch Windows version set to
gt; the European settings!? However I use the English version of Office. In
gt; the
gt; spreadsheet it works fine, but the VBA code seems to be based on US
gt; standards?? Is there a way to change this setting? Moreover I have
gt; currently
gt; installed the Dutch Office version and the problems remain. So typing eg.
gt; 2,5
gt; in a VBA form results in 2.5 in the spreadsheet cell, which is interpreted
gt; as
gt; a text.....
gt;
gt; Regards,
gt;
gt; Jan Bart
gt;
gt; quot;Gary L Brownquot; wrote:
gt;
gt;gt; You hit it.
gt;gt; You're trying to use European data in a UScentric workbook. Excel looks
gt;gt; at
gt;gt; your Windows settings. 3 ways to avoid this are (1) to get your European
gt;gt; counterparts to work in US style (unlikely), (2) to change your settings
gt;gt; when
gt;gt; you absolutely have to use their data in their local format, (3) get VBA
gt;gt; to
gt;gt; make the adjustments for you.
gt;gt; HTH,--
gt;gt; Gary Brown
gt;gt;
gt;gt; If this post was helpful, please click the ''Yes'' button next to ''Was
gt;gt; this
gt;gt; Post Helpfull to you?''.
gt;gt;
gt;gt;
gt;gt; quot;Excelerate-nlquot; wrote:
gt;gt;
gt;gt; gt; If use a VBA form to fill out data which sometimes have a decimal
gt;gt; gt; separator.
gt;gt; gt; In Europe the comma is used as a decimal sign. However when I use a
gt;gt; gt; comma the
gt;gt; gt; value is interpreted as a text when the macro places the value in the
gt;gt; gt; spreadsheet. Only when I use the decimal point in the VBA form, the
gt;gt; gt; value is
gt;gt; gt; accepted as a value in the spreadsheet.
gt;gt; gt; Does this have to to with the MS Window settings or is it releated to
gt;gt; gt; my
gt;gt; gt; english Excel version?
gt;gt; gt; How can a prevent this problem without going into VBA code to tackle
gt;gt; gt; it?
gt;gt; gt;
gt;gt; gt; Thanks in advance
gt;gt; gt; Jan Bart

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()