473,321 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

textbox currency

Hello. Please i need un textboxt type currency with 2 decimals. Very
professional. The controls maskeditbox doesn't professional.

Thanks you for tour help
May 18 '06 #1
3 4100
I'm not sure if this is what you want, but try this:

Dim amount As Decimal = 100.00M

TextBox1.Text = amount.ToString("C2")

May 18 '06 #2
The idea is that the user when press decimal point the cursor goes to de
decimal places and show me formated 999,999,999.99

Help me

"Chris Dunaway" <du******@gmail.com> escribió en el mensaje
news:11*********************@y43g2000cwc.googlegro ups.com...
I'm not sure if this is what you want, but try this:

Dim amount As Decimal = 100.00M

TextBox1.Text = amount.ToString("C2")

May 19 '06 #3

"Jose" <jo********@unica.com> wrote in message
news:Oi**************@TK2MSFTNGP02.phx.gbl...
The idea is that the user when press decimal point the cursor goes to de
decimal places and show me formated 999,999,999.99


This is possible but your question (problem) is very hard to understand.

Private Sub TextBox1_Leave(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TextBox1.Leave
Dim myCurr As Decimal
myCurr = CDec(TextBox1.Text)
TextBox1.Text = Format(myCurr, "Currency")
End Sub
May 19 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Patrick J. Schouten | last post by:
I am new to ASP/VBScript and I am trying to format a texbox when a user exits it. In Visual Basic you could put the following in the Exit property of the textbox: textbox1 = Format(textbox1,...
0
by: Claudia Fong | last post by:
Hi, My db is stored in access and I have a field amount and its type is currency. When I read from the db and display it in a textbox, it shows me 15000000 instead of $150,000.00. How can...
5
by: Dmitry Karneyev | last post by:
How to make TextBox control that allows to input only numerics, currency etc ? Or can I download such stuff ?
1
by: Sreedhar Vankayala | last post by:
Hi, I have a simple textbox in a form page. - If data not available, then user can enter the text "Not available" or "Contact abc person". - If data is available, then user enters the data...
2
by: | last post by:
Hi all, I need to format screen output for a textbox that's bound to a datasource. I know how to format the data in a plain old string, but in this case I'm not sure where to "sneak" in there...
3
by: Aaron Smith | last post by:
I found an quick and dirty example of a numeric text box that converts the string to a currency mask.. Here is the code: Public Class NumericMaskedTextBox Inherits System.Windows.Forms.TextBox ...
1
by: Chris | last post by:
I wanted to display the "$" in front of a few currency textboxes. So I thought this code would do the trick, and my Return FormatCurrency(MyBase.Text) does run, but the textbox still shows the...
3
by: mracuraintegra | last post by:
I am seriously at my wits' end here with this. I've got a textbox bound to a money column in a database, but it shows up as a decimal value, meaning that $9.25 shows up as 9.250000. ARRRRG. ...
0
by: Anonieko | last post by:
Are there any javascript codes there? Answer: Yes On the PageLoad event call InitialClientControsl as follows /// <summary> /// This will add client-side event handlers for most of the...
1
by: =?Utf-8?B?eXVyaWtz?= | last post by:
Hey, I'm building a business application that needs input of currency data. I looked a lot around google and friends for a good custom control to provide interactive validation and formatting of...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.