+ Reply to Thread
Results 1 to 3 of 3

Force dot when editing userform

  1. #1
    Registered User
    Join Date
    05-23-2020
    Location
    Canada
    MS-Off Ver
    office 2013
    Posts
    7

    Force dot when editing userform

    Hello, I hope someone can help me on this. I have this userform to add and edit a database. My computer’s regional setting at work for decimal separator is set to comma and my problem still occurs if I change it to dot*.

    When adding new data in userform my code is set to force dots over comas and then recognize and transfer numbers with isnumeric Function in my database. The data is added with a dot to the database.

    However, when I want to edit, the userform loads the numbers but automatically replace the dots with comas. If I save again, the numbers after the decimals will be erased in the database.

    I suspect my « edit » code to be the problem as it imports numbers back to my userform.

    *I’ve tried changing windows settings to use the dot as decimal separator. It works for a while, but stops working after a windows reboot even if the dot is still the decimal separator, which is odd.

    Any idea on how to fix this?

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Force dot when editing userform

    You might try changing the number format in the regional settings for Windows

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent SAC
    Posts
    8,885

    Re: Force dot when editing userform

    Val doesn't recognise non-US formats. Use CDbl instead.
    Rory

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Editing data by selecting it in one userform and editing in another userform.
    By (T_T) in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-25-2020, 12:41 PM
  2. [SOLVED] Set *everything* on userform to force caps?
    By IMM Tech in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-02-2018, 11:27 AM
  3. [SOLVED] Force userform to close
    By AndyE in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-24-2015, 09:01 PM
  4. Prevent Editing after Date and Force Enable Macros
    By efaden in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2014, 03:11 PM
  5. Replies: 5
    Last Post: 12-08-2012, 04:51 AM
  6. new to macro editing: how to force the selected cell?
    By lkb3 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2008, 03:51 PM
  7. Force Entry on UserForm
    By raehippychick in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2007, 11:33 AM

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