how can I use two txtbox to enter aphanumeric value and taking the first value of the textbox and placing it in the second txtbox with the numbers value being change to the actual wording (1,2 changes to one, two).
18 1530
how can I use two txtbox to enter aphanumeric value and taking the first value of the textbox and placing it in the second txtbox with the numbers value being change to the actual wording (1,2 changes to one, two).
Hi. What limits did you have in mind for these numbers?
For instance, do you want to have "one million five hundred thousand and forty two"
Hi. What limits did you have in mind for these numbers?
For instance, do you want to have "one million five hundred thousand and forty two"
up to 10 is fine
up to 10 is fine
can someone please help me I having such a hard time.
can someone please help me I having such a hard time.
You can do it this way using an array and the Split() function
This works though there are no checks on the user input -
Dim stAr(10) As String
-
Dim arInput As Variant
-
Dim stOutput As String
-
Dim intLoop As Integer
-
-
stAr(0) = "zero"
-
stAr(1) = "one"
-
stAr(2) = "two"
-
stAr(3) = "three"
-
stAr(4) = "four"
-
stAr(5) = "five"
-
stAr(6) = "six"
-
stAr(7) = "seven"
-
stAr(8) = "eight"
-
stAr(9) = "nine"
-
stAr(10) = "ten"
-
-
arInput = Split(Me.txtInput.Text, ",")
-
For intLoop = 0 To UBound(arInput) - 1
-
stOutput = stOutput & stAr(CInt(arInput(intLoop))) & ", "
-
Next intLoop
-
stOutput = stOutput & stAr(CInt(arInput(intLoop)))
-
Me.txtOutput.Text = stOutput
-
You can do it this way using an array and the Split() function
This works though there are no checks on the user input -
Dim stAr(10) As String
-
Dim arInput As Variant
-
Dim stOutput As String
-
Dim intLoop As Integer
-
-
stAr(0) = "zero"
-
stAr(1) = "one"
-
stAr(2) = "two"
-
stAr(3) = "three"
-
stAr(4) = "four"
-
stAr(5) = "five"
-
stAr(6) = "six"
-
stAr(7) = "seven"
-
stAr(8) = "eight"
-
stAr(9) = "nine"
-
stAr(10) = "ten"
-
-
arInput = Split(Me.txtInput.Text, ",")
-
For intLoop = 0 To UBound(arInput) - 1
-
stOutput = stOutput & stAr(CInt(arInput(intLoop))) & ", "
-
Next intLoop
-
stOutput = stOutput & stAr(CInt(arInput(intLoop)))
-
Me.txtOutput.Text = stOutput
-
Thanks but can I actually use this with vb
I am actually trying to run it in VB 2005 express edition
Thanks but can I actually use this with vb
I am actually trying to run it in VB 2005 express edition
I really appreciate your help
Thanks again
Thanks but can I actually use this with vb
I am actually trying to run it in VB 2005 express edition
I have no idea if this runs on .NET or not. Why not test it and see.
Put a couple of textboxes on a form with a button and paste this code into the button_click event. I tested the code with VB6
Let us know if it works.
Good luck
I have no idea if this runs on .NET or not. Why not test it and see.
Put a couple of textboxes on a form with a button and paste this code into the button_click event. I tested the code with VB6
Let us know if it works.
Good luck
Thanks for your reply,
everything seems to be fine however, I get an error "variable 'stOutput' is used before it has been assigned a value. A null refference exception could result at runtime" and is this vb coding? I think it is.
Thanks for your reply,
everything seems to be fine however, I get an error "variable 'stOutput' is used before it has been assigned a value. A null refference exception could result at runtime" and is this vb coding? I think it is.
Try this just after the last Dim statement
stOutput = ""
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: M Smith |
last post by:
I have a form I want to submit to itself. I want to be able to type in a
list of numbers and submit the form and have that list show up on the same
form under the text box I typed them into and the buttons. The problem is
when I post a form to itself, the Enter key will not submit the form, it
only clears the contents of the text box. The only way I can submit is to
click the submit button. Here is a simplified version of my code that I...
|
by: Koen |
last post by:
Hi,
I have three objects in my form:
a listbox (lstform)
a subform (fsub)
a txtbox (txt)
The listbox lists form names that will be displayed in the subform. To do
this I use the following line in the afterupdate event of the listbox:
|
by: DD |
last post by:
I have a subform on a form
In the subform i have a chkBox= and a txtbox=
The idea is you Chk and the price $40.00 is
automaticly entered into
The chkBox has code
Private Sub BuffetDinner_Click()
'Automaticly applies $40.00 into Dinner40 txtbox
If () = True Then
|
by: Rich |
last post by:
Hello,
So I would like to disable a textbox on a vb.net form
without the text getting grayed out. In vb6 I could place
a textbox control on a frame control and disable the frame
leaving the textbox enabled and text/background were
intact but mouse cursor remained an arraw (as opposed to
an I for editable). I tried a Panel control on my .net
form since I could I guess there is no longer a frame
control (also tried a groupbox control)....
|
by: Boki |
last post by:
Hi All,
// code start
alert("document.all.txtbox"+valueA+".value")
// end code
could you please advice,
can it show the value of txtbox ?
| |
by: Jeff |
last post by:
A client wants a press of the Enter key in a field on a continuous form to
grab the value of that field from the previous record.
But if they have typed a value and then hit Enter it shouldn't.
I have tried a few ways but the main problem is that after typing a value
and hitting Enter it still grabs the value from the previous record,
trashing the value they just typed.
Any ideas from you lateral thinkers.
|
by: ebasshead |
last post by:
Hi Everybody,
I have a txtbox that populates itself when the start of the form is filled out. But sometimes I have to change the info in that specific txtbox. At the moment it wont allow me to. Is there a way to override the preexisting data in the txtbox when I click on it, and then enter a different number?
Cheers Ed
|
by: HHAAPPYY |
last post by:
Hi
I am trying to pass value of the textbox along with another value to the query string.
when i am retriving the txtbox value it always shows me null,
my senario is like this
On my page div_admin.asp i have following things.<%
Dim page, content,console,banner,navbar
|
by: mailbox73 |
last post by:
Hi,
c# 2008 express edition.
Can anyone please help me figure out why I cannot get any value from one form to another when the controls are databound. (the formY.txtbox lands up empty)
in formY I write in the load event:
Formx frmx = new Formx();
txtCustomer.Text = frmx.customerIdTextBox.Text;
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |