Guyz how can I get all the characters (not in the keyboard) in a string and
display it in another txtbox?
txtbox1 = "™ÈñõŒ the dog ←ÖÜç"
string1 = txtbox2
txtbox2 = "™ÈñõŒ ←ÖÜç
make it simple plss. :(
Thanks....
Printable View
Guyz how can I get all the characters (not in the keyboard) in a string and
display it in another txtbox?
txtbox1 = "™ÈñõŒ the dog ←ÖÜç"
string1 = txtbox2
txtbox2 = "™ÈñõŒ ←ÖÜç
make it simple plss. :(
Thanks....
The Asc function will return the ascii character code for each character.
VB Code:
MsgBox Asc("™") '153
yup i know that. But how can check if the word is not in the keyboard?
Ok, which. Alpha, numeric, special characters, control chars, etc.
This will add only the captiol letters from A-Z to textbox 2.
VB Code:
Option Explicit Private Sub Command1_Click() Dim i As Integer For i = 1 To Len(Text1.Text) If Asc(Mid$(Text1.Text, i, 1)) > 65 And Asc(Mid$(Text1.Text, i, 1)) < 90 Then Text2.Text = Text2.Text & Asc(Mid$(Text1.Text, i, 1)) & "," Else MsgBox Mid$(Text1.Text, i, 1) & " Is not within the acceptable range of characters allowed." End If Next End Sub
Thanks robdog :)
All of them..Quote:
Originally posted by RobDog888
Ok, which. Alpha, numeric, special characters, control chars, etc.
How can check if the all the characters in a single word is all ASCII
characters? If true put it in the txtbox2.
Thanks.... :wave:
My code checks each character in the textbox. Then you need to include the characters you want in the If statement. Maybe change it to a select case statement block since it will get larger to include all keyboard characters.
So what will be the offending characters if they are not on the keyboard?
On my Swedish keyboard I'll have an Ö key, as well as Å and Ä. In Swedish these are not just oumlated O and A characters, they are actual letters in our alphabet which differs from O and A in the same way as a B is different from a Q.
Well yes thats what I was getting at. Its easier to trap for the extended keys or such instead of everything else. :)
I recently had to do this at work and I just made a loop to remove all Non 7-bit ASCII characters as they cause.... Problems for us. The loop just goes....
VB Code:
For i = 128 To 255 If InStr(1, String, Chr(i)) then 'Stuff to deal with it here.. End If Next
That's a rough break down as I wrote it in VBA for Excel originally.
Hope that offers some help.
Thanks guyz... :thumb:
Spajeoly, Joacim, RobDog888
I'll just create a case statement :)
:eek2: i didn't know that such characters exist in Swedish keyboard :bigyello:
I'm talking about the ordinary keyboard. The standard I think.. :rolleyes:
Thank you so much guyz. It helped me a lot. Now I know. bb :wave:
LOL, I have a ordinary standard (Swedish) keyboard. American keyboards aren't that very ordinary over here. :)Quote:
Originally Posted by myrea
I agree with that guy