|
-
Apr 30th, 2004, 05:44 PM
#1
Thread Starter
Frenzied Member
TextBox Question
If you had two textboxes and in the first one the user typed a number such as 15. How would you get it to say Fifteen in the second textbox?
Last edited by System_Error; Apr 30th, 2004 at 06:49 PM.
-
Apr 30th, 2004, 07:17 PM
#2
PowerPoster
Hi,
There is always the long way;
Select case val(txt1.text)
case 1
txt2.text="One"
etc
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Apr 30th, 2004, 08:49 PM
#3
Member
Make an array of a string variable and have each of the values of the array hold the text for the name of number. (This would only work if you were willing to type in up to the number that you needed in text.) For example:
VB Code:
Public NText$(9) As String
NText$(0) = "Zero"
NText$(1) = "One"
NText$(2) = "Two"
NText$(3) = "Three"
NText$(4) = "Four"
NText$(5) = "Five"
NText$(6) = "Six"
NText$(7) = "Seven"
NText$(8) = "Eight"
NText$(9) = "Nine"
'NText$(n) = "(English Equivilant)"
'....on forever
Then when you needed it. You could refrence the variable in your code.
VB Code:
Sub Text1_Change
If IsNumeric(Text1.Text) = True THEN Text2.Text = NText$(VAL(Text1.Text))
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|