+ Reply to Thread
Results 1 to 3 of 3

Number Format in a TextBox - VBA Calculator

  1. #1
    Registered User
    Join Date
    04-09-2012
    Location
    São Paulo, Brazil
    MS-Off Ver
    Excel 2007
    Posts
    78

    Unhappy Number Format in a TextBox - VBA Calculator

    Hello,

    I just have made a calculator on VBA, including a simple financial function. Everything is working fine, but the value that is shown in the textbox dont take any format. And if i use this code -- Visor.Value = Format(Visor.Value, "#,#0.00") -- I just take this format number -- 1,234 (I am in Brazil, so we use comma to show the cents) -- anyone have any Idea of what I can do?

    Here is the file with the calculator: Calculator.xlsm

    Here is the Code I used (Feel Free to use it, if you improove the code just share...):

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    04-09-2012
    Location
    São Paulo, Brazil
    MS-Off Ver
    Excel 2007
    Posts
    78

    Re: Number Format in a TextBox - VBA Calculator

    I just tryied to use the code bellow to format the number, it worked JUST for complete numbers, without cents:

    Please Login or Register  to view this content.
    Any Idea?

    Thanks,

  3. #3
    Registered User
    Join Date
    04-09-2012
    Location
    São Paulo, Brazil
    MS-Off Ver
    Excel 2007
    Posts
    78

    Re: Number Format in a TextBox - VBA Calculator

    Solved......

    I just insert a new TextBox Called VISOR2 that is a formated copy of the VISOR. I know, it´s a trick, but Solved my problem for now.

    In my researchs i realize that this problem occurs because of the cursor location in a textbox, as I don't know how to control it...

    Here is the file, Free for Use: Calculator.xlsm

    Thanks,

    Pulsus

+ 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