CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: text boxes

  1. #1
    Join Date
    Mar 2001
    Posts
    29

    text boxes

    I would like to format the text of a text box that it should comma separators and have parenthesis when it is a negative number.
    e.g. -200000 should be (200,000)

    Thanks!


  2. #2
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    78

    Re: text boxes

    Use Format(Text1.Text, "###,###.##;(###,###.##)"). You can add $ before it and 0 like so $#,##0.00 try reading about the function Format to learn more.


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured