Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code

Status
Not open for further replies.

DUF

Technical User
Mar 10, 2001
107
IE
I’am New to VB6 and need some more help My last thread was thread 222-114702 where I got good help. I needed to convert numbers to a characters see following example

Private Function NumConvert() As String
Dim cResult As String
Dim cTemp as String
Dim i As integer
Dim cString As String

cString = "XINSCRUTAB"
For i = 1 To Len(TextBox1.Text)
cTemp = Mid(TextBox1.Text, i, 1)
If(cTemp = ".") Then
cResult = cResult & "."
Else
cResult = cResult & Mid(cString, i, 1)
Next i
NumConvert = cResult
End Function


End Function


I now need to convert the characters to numbert as NINIX = 21210 using two textbox.
The Character code will be entered into TextBox1 converted and the result in TextBox 2.

Can any one help with this I have tried but failed .

OR

How do I take the value form TextBox1 before it is converted???

Thanks
Duf
 
Hi,
It's OK I have figured it out
thanks

Duf


 
Glad you made that. A small advice: don't put a blank space between thread and 222 -> thread222-114702, will then automatically create a link to it. _________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top