Numeric textbox

Input numeric in textbox with seprator

Page 1 of 1

4 Replies - 5377 Views - Last Post: 01 June 2009 - 10:34 PM Rate Topic: -----

#1 vinhkhuong  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 23-May 09

Numeric textbox

Posted 24 May 2009 - 11:54 PM

Please help me,
I use visual basic 6 for my programe. I want that when I input a numeric into textbox, it will auotmatic separator numeric with dot point (.) symbol for thousand and "," symbol for decimal, because I live in Vietnam.
Thanhk so much.

Lamvinhkhuong
Is This A Good Question/Topic? 0
  • +

Replies To: Numeric textbox

#2 firebolt  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 92
  • View blog
  • Posts: 5,561
  • Joined: 20-February 09

Re: Numeric textbox

Posted 25 May 2009 - 12:00 AM

You just write a code saying, when this ascii code for the decimal is typed in, a comma is displayed instead.
Was This Post Helpful? 0
  • +
  • -

#3 thava  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 180
  • View blog
  • Posts: 1,606
  • Joined: 17-April 07

Re: Numeric textbox

Posted 25 May 2009 - 03:29 AM

use the format funtion to achive your taxk

format is used to format the entered text

or simply used the maskededit textbox
Was This Post Helpful? 0
  • +
  • -

#4 vacvac  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 01-June 09

Re: Numeric textbox

Posted 01 June 2009 - 04:09 PM

You can make code to write , or . depending on the number of the characters
Was This Post Helpful? 0
  • +
  • -

#5 xylifagz  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 01-June 09

Re: Numeric textbox

Posted 01 June 2009 - 10:34 PM

like that?:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If (KeyAscii <> vbKeyBack) And Not IsNumeric(Chr(KeyAscii)) Then KeyAscii = 0
End Sub


change Text1 by your textbox

and about separator i think you can make
text2.text = text1.text (add the numeric from the anti no numeric textbox)
and after you can use the REPLACE func

This post has been edited by xylifagz: 01 June 2009 - 10:45 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1