Results 1 to 10 of 10

Help with a formatting problem - Textbox to sheet and back.

Threaded View

  1. #1
    Forum Contributor
    Join Date
    01-13-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2010 and 2019, but only 2019 to test if my sheets works!
    Posts
    149

    Help with a formatting problem - Textbox to sheet and back.

    Hi Forum.
    This text below is in the attached workbook too..



    I have a formatting problem.
    But first...
    - In Danish we use a dot as the 1000 separator.
    - And a comma as the 2 digit decimal separator.
    - Looks like this = 1.000,50

    I want to type the amounts in a Userform.Textboxes.
    To make the amount calculate on the sheet B4, I force the 2 digit decimal comma to change into a dot in the textbox, when typing a comma.
    So far so good and I don't care if it shows a dot as the 1000 separator too, but if it can be fixed automatic to show the English comma and still is calculation in B4, it would be perfect.

    Now my Problem.
    When I close and open the Userform again
    - It will not show the 1,000 separator dot (or comma).
    - And it will only show 1 digit after the 2 diget decimal number, when I type a zero (0) as the last digit = When opening the Userform it shows 1000.5 instead of 1000,50.

    Open the Userform to see how it will show in the Textboxes.
    The codes is on the button in the VBA.

    The codes to change the comma to the dot is on each Textbox.
    Plus some other codes I tried to use, to see if they would work.



    I really hope someone can help me and put the codes into my VBA, to resend it to me.
    I always have these trouble with the formatting, when trying to make a Date or an amount/a number, because of the difference the English VBA and the Danish formatted Excel
    Attached Files Attached Files
    Last edited by gnaske; 03-29-2021 at 09:16 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] problem copy data from userform to sheet by multiple combobox & textbox
    By ABDELFATTA in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-12-2020, 07:55 AM
  2. [SOLVED] How to return back to textbox after
    By maroni in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-19-2017, 08:02 AM
  3. [SOLVED] Userform textbox date sorting problem in main sheet
    By amoxia in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2014, 09:28 PM
  4. [SOLVED] Userform TextBox Problem... formatting code clears data instead of formatting
    By michaeljoeyeager in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-26-2012, 11:00 AM
  5. Moving focus back to first textbox
    By LisaPatch in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-01-2011, 10:23 AM
  6. Textbox Date formatting problem
    By Capp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-11-2006, 02:20 PM
  7. [SOLVED] Textbox Date formatting problem
    By Capp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-11-2006, 01:55 PM

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