+ Reply to Thread
Results 1 to 4 of 4

Decimal point/comma issue

  1. #1
    Excelerate-nl
    Guest

    Decimal point/comma issue

    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

  2. #2
    Gary L Brown
    Guest

    RE: Decimal point/comma issue

    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
    gary_brown@ge_NOSPAM.com
    If this post was helpful, please click the ''Yes'' button next to ''Was this
    Post Helpfull to you?''.


    "Excelerate-nl" wrote:

    > 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


  3. #3
    Excelerate-nl
    Guest

    RE: Decimal point/comma issue

    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

    "Gary L Brown" wrote:

    > 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
    > gary_brown@ge_NOSPAM.com
    > If this post was helpful, please click the ''Yes'' button next to ''Was this
    > Post Helpfull to you?''.
    >
    >
    > "Excelerate-nl" wrote:
    >
    > > 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


  4. #4
    Niek Otten
    Guest

    Re: Decimal point/comma issue

    <the VBA code seems to be based on US standards>

    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

    "Excelerate-nl" <[email protected]> wrote in message
    news:[email protected]...
    > 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
    >
    > "Gary L Brown" wrote:
    >
    >> 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
    >> gary_brown@ge_NOSPAM.com
    >> If this post was helpful, please click the ''Yes'' button next to ''Was
    >> this
    >> Post Helpfull to you?''.
    >>
    >>
    >> "Excelerate-nl" wrote:
    >>
    >> > 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




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1