+ Reply to Thread
Results 1 to 9 of 9

Textbox formatting conundrum

  1. #1
    Forum Contributor
    Join Date
    08-30-2015
    Location
    Tresfjord, Norway
    MS-Off Ver
    365
    Posts
    169

    Textbox formatting conundrum

    Hi ...

    I am registering numbers into one of my sheets, by the use of a userform. This is unknown area to me.

    From what I can deduct here, it must be like this; [that] the formatting of the textbox is for the text box and the textbox only, and do not even arrive the target cell. So ... by formatting the target cell as a number, one should expect that the problem was solved, but it's definitely not. It seems that the textbox is sending a textstring, that's it, and the target cell can't manage to reformat it to a number, resulting in numerals errors in the subsequent depending formulas.

    Have anyone here, in this forum, experienced something like this?
    And my be solved it? Perhaps? Uh?

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Textbox formatting conundrum

    Have you tried a variation of
    Please Login or Register  to view this content.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Textbox formatting conundrum

    Don't format, convert the text value from the textbox to a numeric value using one of the VBA conversion functions, e.g. Val, CInt etc.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    08-30-2015
    Location
    Tresfjord, Norway
    MS-Off Ver
    365
    Posts
    169

    Re: Textbox formatting conundrum

    Sorry, folks ...
    But none of your suggestions worked so far...
    Still the value of the textbox is transferred to the appropriate cell as a txt-string.

  5. #5
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,302

    Re: Textbox formatting conundrum

    formatting the columns usually works for me.
    formatting the output to the textbox then keeps the number viewed identical
    as per attached userform
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    08-30-2015
    Location
    Tresfjord, Norway
    MS-Off Ver
    365
    Posts
    169

    Re: Textbox formatting conundrum

    I've managed to make a sheet where you guys can test what's going on.
    In the enclosed spreadsheet click on the arrow, and tap in FakturaNr. (Meaning Invoice number), Amount and date.

    I can't get these numbers to get the right format when they arrive at the targeted cell.
    Attached Files Attached Files
    Last edited by Tresfjording; 04-11-2020 at 08:00 AM.

  7. #7
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,302

    Re: Textbox formatting conundrum

    Try this

    Please Login or Register  to view this content.

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Textbox formatting conundrum

    This seem to work for me.
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    08-30-2015
    Location
    Tresfjord, Norway
    MS-Off Ver
    365
    Posts
    169

    Re: Textbox formatting conundrum

    Well, what about that!?!?
    My dear, Norie, you did it!
    Your solution worked flawlessly!
    Thanks a heap!!

+ 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] Conditional Formatting Conundrum
    By kyjae in forum Excel General
    Replies: 3
    Last Post: 03-26-2015, 11:54 AM
  2. [SOLVED] Conditional formatting userform textbox based on textbox value
    By kidwispa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-03-2014, 08:28 AM
  3. Conditional Formatting Conundrum
    By kwelch66 in forum Excel General
    Replies: 2
    Last Post: 01-18-2014, 02:17 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. conditional formatting conundrum
    By henro8 in forum Excel General
    Replies: 6
    Last Post: 08-05-2008, 11:08 AM
  6. Formatting conundrum
    By scunni in forum Excel General
    Replies: 3
    Last Post: 10-29-2006, 08:12 PM
  7. VBA conundrum
    By csi in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 10-27-2005, 03:05 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