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).
Nov 11 '06
18 1532
Try this just after the last Dim statement
stOutput = ""
Now I get A different error for this line stOutput = stOutput & stAr(CInt(arInp ut(intLoop)))
error: Conversion from string "jkhkjh" to type 'Integer' is not valid.
sorry about the stupid question. Yeah it is vb
Try this just after the last Dim statement
stOutput = ""
Now I get a different error for this line stOutput = stOutput & stAr(CInt(arInp ut(intLoop)))
error: Conversion from string "juji67" to type 'Integer' is not valid.
Now I get a different error for this line stOutput = stOutput & stAr(CInt(arInp ut(intLoop)))
error: Conversion from string "juji67" to type 'Integer' is not valid.
oh this is page two I was looking for the last post I thought it was on page 1
oh this is page two I was looking for the last post I thought it was on page 1
Did you copy and paste this code or did you type it in.
There is no error when run under vb6
What is being typed into the first textbox. this should be numbers separated by a comma.
Now I get A different error for this line stOutput = stOutput & stAr(CInt(arInp ut(intLoop)))
error: Conversion from string "jkhkjh" to type 'Integer' is not valid.
sorry about the stupid question. Yeah it is vb
This includes a check for numeric entries -
Dim stAr(10) As String
-
Dim arInput As Variant
-
Dim stOutput As String
-
Dim intLoop As Integer
-
-
stOutput = ""
-
-
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
-
If IsNumeric(arInput(intLoop) Then
-
stOutput = stOutput & stAr(CInt(arInput(intLoop))) & ", "
-
Else
-
MsgBox "Please enter single numbers separated by a comma"
-
Me.txtInput.Text = ""
-
Me.txtInput.SetFocus
-
Exit Sub
-
End If
-
Next intLoop
-
stOutput = stOutput & stAr(CInt(arInput(intLoop)))
-
Me.txtOutput.Text = stOutput
-
This includes a check for numeric entries -
Dim stAr(10) As String
-
Dim arInput As Variant
-
Dim stOutput As String
-
Dim intLoop As Integer
-
-
stOutput = ""
-
-
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
-
If IsNumeric(arInput(intLoop) Then
-
stOutput = stOutput & stAr(CInt(arInput(intLoop))) & ", "
-
Else
-
MsgBox "Please enter single numbers separated by a comma"
-
Me.txtInput.Text = ""
-
Me.txtInput.SetFocus
-
Exit Sub
-
End If
-
Next intLoop
-
stOutput = stOutput & stAr(CInt(arInput(intLoop)))
-
Me.txtOutput.Text = stOutput
-
ok it does work however I was hoping to enter a words/letters and numbers without commans and convert the numbers from numeric to the actual world.
ex.
txtInput: hello123
click button
txtOutput: helloonetwothre e
and if you don't mind can you then try and reverse it
txtInput: OneTwoThreehell o
ok it does work however I was hoping to enter a words/letters and numbers without commans and convert the numbers from numeric to the actual world.
ex.
txtInput: hello123
click button
txtOutput: helloonetwothre e
and if you don't mind can you then try and reverse it
txtInput: OneTwoThreehell o
sorry I mean txtOutput: OneTwoThreehell o
ok it does work however I was hoping to enter a words/letters and numbers without commans and convert the numbers from numeric to the actual world.
ex.
txtInput: hello123
click button
txtOutput: helloonetwothre e
and if you don't mind can you then try and reverse it
txtInput: OneTwoThreehell o
Great so you now have a working model that you can improve upon and learn from. Happy hunting :)
Great so you now have a working model that you can improve upon and learn from. Happy hunting :)
Thanks for all your help. I appriciated
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |