Consulting

Results 1 to 6 of 6

Thread: VBA userform - decimal separator

  1. #1
    VBAX Regular
    Joined
    Dec 2013
    Posts
    15
    Location

    VBA userform - decimal separator

    Hi,

    I've a VBA userform that finds values in an excel workbook and fill an textbox with that value. I used find and offset to do that. The value is for example "1,4".

    On my PC, it fill correctly the textbox with value "1,4" but if I try to run the same VBA userform on another PC it fill the textbox with the value "1.4".

    Why is it happenning?

    Thanks

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,058
    Location
    Check the system settings for the decimal separator
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Hi all,

    Not tried whatsoever...

    I am wondering if on the 2nd PC, the cell's formatting comes into play. Again, very much not thought through, but have you tried using .Text rather than .Value to grab the cell's return?

    @Ted:

    A belated Merry Christmas my friend, and a Happy New Year to you and yours :-)

    Mark

  4. #4
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location

  5. #5
    VBAX Regular
    Joined
    Dec 2013
    Posts
    15
    Location
    Quote Originally Posted by GTO View Post
    Hi all,

    Not tried whatsoever...

    I am wondering if on the 2nd PC, the cell's formatting comes into play. Again, very much not thought through, but have you tried using .Text rather than .Value to grab the cell's return?

    @Ted:

    A belated Merry Christmas my friend, and a Happy New Year to you and yours :-)

    Mark
    I've replaced .Value by .Text and it works!

    Thanks

  6. #6
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Quote Originally Posted by agfac View Post
    I've replaced .Value by .Text and it works!

    Thanks
    You are very welcome. I hope you read the part about cross-posting politely.

    A Happy and Prosperous New Year to you and yours,

    Mark

Posting Permissions

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