Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Special Characters In VBA

[vba]I'm trying to insert a Section symbol in VBa but have had no luck. The special charater is part of a sentence that is put in a text Form Field. I would put in in the body of the document but unfortunately it is an option and is only there when that particular option is selected. Any idea on how to accomplish this. [/vba]

The line of code where I am trying to insert the symbol looks like this:

ActiveDocument.FormFields("Designation").Result = "CERTIFIED MAIL, RETURN RECEIPT REQUESTED" & vbCr & "(Bus. & Prof. Code 6002.1(c))"

The Section symbol goes right before the 6002.


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Help Special Characters

I need help here in my project

I want to deploy a check on the whole project that User Can't Enter any special character in any textbox or Input.
If i write code for every textBox it will be long procedure because in this project there are almost 26-30 Entry forms and each form has almost 20-30 textboxes so i hope you can understand

One more thing i want to check the E-Mail format for any input from the user


Special Characters
I want to type special characters which are not in the keyboard like Alpha ,Beta and some Mathematical Characters in the textbox or ritch text box along with the normal alphabets..So plz help me give me any idea or code .

Special Characters
Is there a way to put <font color=blue>special characters</font color=blue> in an MsgBox? I tried using Character Map, but it didn't work. When I tried to put in a R in a circle, it showed it like this:

Special Characters In XML
Hi !

Not really pure VB, but anyway : how can I include special characters (like &lt;, &gt;, &, etc...) in an XML document ?


<font color=green>Do or do not
There is no try</font color=green>

Special Characters
how can i print in a form special characters(i use Visual Basic 5.0)????
for example the character "ę" has code 119 in UNICODE(hex) and 281 in ASCHI(decimal)
With ChrW(281) it print's a simple "e"

Edit by Moderator:
Please start your own thread to ask your own questions in future.

Thank you.

Special Characters
How can I tell if "Special Characters" were pressed?

Using GetAsyncKeyState.

I realize that the ASCII codes don't work


If GetAsyncKeyState(92) = -32767 Then ' = 92 according to Charts
Msgbox " was pressed"
End If

That does not work

Special Characters
i have read up on the charmap and i know the code for the character that i want to use and i can input this character in my text field if i use the key board , but i want to press a button to enter this character i have tried the sendkey and keycode stuff but i cannot get anything to work.

Special Characters
I'm pretty new to VB and I was wondering how to add quotes. For example if I have the following statement: var="Jane said "hello"", how would I get those inside quotes to display?

No Special Characters
hey guys.

i wouldnt know wat to search but
can some 1 point me in the direction of having a sertain thing

abc123()&%$## and no special characters
like ║∟ thx

Special Characters In Vb6
how can you display special characters which are out of the ascii range?

Whenever i paste or type a unicode character (like greek or chinese) it appears as a '?' in the IDE

Any way around it or do i need to upgrade to .NET?

Special Characters
I need to know how many instances there are of special characters, like periods and commas, etc, in a specific string (which will be in a text box on my form.)

Any ideas?

Special Characters
how can i get special characters input (like square, degree etc.) into text box !

Special Characters
I want to make sure that a string has only numbers or characters in it. Any Ideas, Thanks - Gene

Special Characters
How the hell do you display special characters like " in a text box? say how would i output (he said "im sick off this" in a dull tone). is there a character (like , / or #) that will alow speach marks to be outputted.

Vb&#039;s Special Characters
How do i input "/" as a slash but not a division sign?

Special Characters Pbs

I'm developped a Rational script to test Siebel v7 functionnality

I want to enter the following sentence in a Siebel field :
[Personal System Id] = 'France' and [Emp #] = 'GREA25'

I've coded it as follow :
InputKeys "{[}"
InputKeys "+(p)ersonal +(s)ystem +(i)d"
InputKeys "{]}"
InputKeys " = '+(f)rance' and "
InputKeys "{[}"
InputKeys "+(e)mp "
InputKeys "{#}"
InputKeys "{]}"
InputKeys " = '+(grea25)'"

The result is :
Personal System Id] = 'France' and Emp ] = 'GREA25'

My problems are :
- the '[' is not displayed, I've looked at the help and normally it
should be
- the '#' is not displayed and a new Internet Explorer window is
opened to send a message to the Microsoft Support, in the help I've
found nothing about this character.

Could you help me ?


The Special Characters?(I Need Your Help!!!!!!!!)
How can I intruduce in a VB interface application chatacters like ţ and ş. I am from Romania and in our language this charachers are frquently used.

Special Characters
I have a field with a special character at the end of the field. The field is being populated from mainframe DB2 data and I believe it is a Hex’00’. The character looks like a vertical bar. This special character is causing me problems when try to insert it into an SQL table. Do you have any suggestions on how to identify this character in Visual Basic 6.0 (I am afraid there will be more) and thus remove it?

Any help you can offer will be greatly appreciated. Thanks.

Special Characters In VB6.0
Hi all,

How can I pass special characters into a function, such as :
I want to replace " in mystring
mystring = replace(mystring,""","") <--not working

same as in C#
mystring = mystring.Replace(""", " ")


I Need Help Re Special Characters In VB
Hello there,

I am developing this application, Educational Measurement System, where teachers bank their questions. THe problem is there are questions that involves special characters esp in Mathematics. WHen i tried to invoke the ASCII in a textbox control, it's not giving the right character.

Please help!


Special Characters In XML
I'm using VB6 and the XMLDOM SetAttribute to create an XML file. The DOM isn't translating foriegn characters like umlouts, grave and accute accents etc into the correct escape sequence. If I do it manually (é for example) the & gets translated into & and the sequence doesn't work.
Can anyone help on this? Am I missing something really simple?


Special Characters
Is it possible to insert special characters such as mu (that weird u thing seen in weights like ug = micrograms). I guess I need to insert just one character from a different font but I can't figure out how.

XML Question About Special Characters
First let me start by saying I'm something of a newbie, having only started with VB about 6 or 7 weeks ago, but thanks to all the great help I've recieved here in the forums I am learning things quite fast. Anyway I'm trying to make a personal movie database, and am now working on export functions, to XML specifically at the moment. My problem is that some of the memo fields contain special characters like ascii key 229,etc...Now I know that if I replace say ascii character 229 with å then the xport will work. Well the export works anyway for some reason no parse error occurs when creating the file, but it happens when the file is loaded. So what I need to do is figure out a way to replace these ascii characters with their unicode equivalents, but the only way I can think to do this is a long series of replece statements for the fields, but this seems rather lengthy, and is unnecessary for 90% of the entries. I wish I knew more about VB so I could come up with some kind of case statement where it evalutes the contents of the field and replaces the necessary characters. Any suggestions or advice would be greatly appreciated. Thank you.

Special Characters For MSN Messenger...?
I do not know if his is possible or not, this is why I am asking this here. Well, if you have ever used something called MsgPlus! (it is addon for MSN Messenger) it has a feature that if you type something in the conversation window, like this '/stats' and when you press send you nor the user sees the word /stats but instead they woul maybe see your computers type of operating stystem or some kind of info.

What I am trying to say is, if I were to type something like /time in the MSN Messenger conversation box, and once I press send, instead of it saying /time, it woul show the what time it is (the current time).

Is this possible, and if it is, how would I do something like this?


Special Characters In A Textfield
Hi folks,

I have this problem with special characters. First when I copy these two: 'ćč' to a textfield then they're changed there to 'cc'.
The font is san serif and in word it can draw these characters why can't a textfield do that?

second can my msde 2000 database save those characters or can't the database do that?

Special Characters Don't Print
In my MS Access db, I had the Greek symbol for DELTA in one of my fields. Δy/Δx

My VB6 project read the record and was supposed to put the data in a picturebox.

When it printed the data it did not show as the Greek letter Delta but rather as a question mark '?'
What printed was ?y/?x

I was using the same font in both.

Any clues?

XML Accents &amp; Special Characters
I create a XML file by coding ,which encoding is "ISO-8859-1",when I try to Load it, an error: An invalid character was found in text content, appears.
I read that the reason for that are characters with ASCII greater than 128, thease are Accents & Special Characters.
Some of them I replaced with their not accented equivalents,but with the others....????
Do you know how to get out of that problem?

Finding Special Characters
I am trying to implement the Save function. So I need to check whether the content of the text box has already been saved with a filename or not. If it hasn't been saved already I need to display the Save dialog box and prompt the user for a new name.

The way I am planning to do this is to check the caption and see if it has a "-" symbol in it.

So my basic question is how do you check for the presence of a special character ("-" in this case) in another string.

Thanks for the help.

Special ASCII Characters
Hi All!
How Can i use special character like ALT + 255 in my code??
i want to write to .ini file like [ALT+255] & BlahBLah how can i do this?

plz help

Escaping Special Characters In SQL
Quick question: How do you escape the square brackets '[' and ']' in SQL?

Reason: I have data in SQL that begins and ends in square brackets, I can't search for them because the SQL query is translated roughly into "look for data with characters between the square brackets".

Example: SELECT UserName, UserID FROM tblUsers WHERE UserName LIKE "%[super_user]%"

In MS-SQL I also tried this as SELECT USerName, USerID FROM tblUsers WHERE UserName LIKE '%super_user%'.

Note: I know how to handle single quotes and ampersands and stuff, but this has me stumped!

Special Characters To Be Inserted
Hi all
I tried to insert a string including special characters like apostrophe s ('s) using a richboxtext in vb6 to sql server 2000 database. I cant insert this string and I always get an error message. if I remove that ('s) then I can insert. please help me to find a solution soon.

thanks buddy

Check For Special Characters
Hi experts

Actually I want to validate a text box that contains only alphabets, no numbers or special characters allowed

Kindly help


Removing Of Special Characters
We display an expression in excel , in which there are also some small boxes being diaplayed in expression.

somes boxes are getting removed when we give
but some are not.

Are there any other keywords like vbnewline which displays small boxes, which when given will remove the small boxes

Can't Insert Special Characters
Hi folks,

A client who is using an application of mine is having trouble inserting special characters in the documents she makes with it. Any foreign characters she tries to insert (such as or ) are converted to other, normal, characters instead. This only happens with my application, not with any other on her system. Could this be caused by any system language or keyboard settings?

Any help would be greatly appreciated.

How To Skip Special Characters
hi i'm newbie in vb programming i just wanna ask what sould I add to my codes to skip this characters ( || ) because it make my text scrambled
here is the pic:

i just want to make it display like this:

what should i add? here is my codes:

VB Code:
Public Sub ReadSMS()Dim i As IntegerDim Label1 As StringDim Label2 As StringDim Label3 As String lvMsg.ListItems.Clear                          For i = 1 To 100        If Mobile1.ReadSMSMessage(i) Then           Label1 = Mobile1.MSGPhoneNumber           Label2 = Mobile1.MSGText           Label3 = CDate(Mobile1.MSGDateTime)           Set n = lvMsg.ListItems.Add(, , Label1)               n.SubItems(1) = Label2               n.SubItems(2) = Label3         Else           lblReadStat.Caption = "Status: Now Connected!"        Exit Sub    End If       Next i Mobile1.CloseEnd Sub


ASCII Special Characters
I am working on a text editor which will allow my wife to write text in a language other than English (French and Spanish specifically). I want to make a series of buttons which will input one of the accented letters into the text box. How can I render a special character by simply clicking a button? I know what the codes are to create these characters in Word. Can I use the same codes?

Displaying Special Characters
so im using the following code (snippet):

Dim Retext As String
If num >= 39 And num <= 51 Then
Retext = System.Convert.ToChar(&H2660)
End If

Return Retext

to display the suits of cards for a poker simulation. This works just fine in Windows XP. When i run the executable, i can see the heart, spade, diamond, and clubs characters just fine.
However, when i run the same executable in Windows 2000, all i get is a bold pipe character.

Any reason why different versions of Windows would convert hex characters differently?


Adding Special Characters
I am working on a program that deals with math expressions. I want to let the users format a expression, just like the equation editor in MS Office.
But the problem is that some of the math symbols in a font are unicode characters. I wrestled a lot with it, but can't get a unicode char to display. It always shows a '?' symbol, regardless of the code.
So, can anybody tell me how to display a unicode character programmatically?. StrConv doesn't work !!

List Of Special Characters
how could I create a string array that contains
all possible special characters?

all letters from A to B and from 1 to 9 are allowed.
all other possible characters should be listed in
the string array.

is this possible?


Special Font Characters?...
I need to use special characters from the OCR font for a program that prints my own bank checks, anyone know how to use these?

Instr With Special Characters
I have a statement that reads as follows:

openTag = InStr(urlText, strBegin)

At my breakpoint, I know 100% sure that urlText contains the characters <hr> & Chr(13) & Chr(10) & <ul>

That's the characters "<hr>" followed by a carriage return-line feed pair followed by "<ul>"

I know for a certainty that that string is at charpos 1220 in the string urlText.

I assign strBegin as follows:

strBegin = "<hr>" & Chr(13) & Chr(10) & "<ul>"

And InStr returns 0 Huh?

I use the debugger and Print these values. I copy-paste them to a Notepad file and examine them in Binary (hex) format. I can see that they are as stated.

So why does the InStr fail? Has it anything to do with special characters?

Thanks. ....Vidya

Instr Special Characters 
I am having problems using Instr where a line contains (special characters) xxx= Instr(xyz,"")

The particular line contains   i need to use this as a delimiter to split the line...

If i loop through the line checking character by character
for ll= 1 to 999
xxx=asc(mid(xyz,ll,1))  i get   it = 2.. all ok
if xxx = 2 then  ..........
next ll

This is a bit cumbersome....  is there any trick to get Instr to look for a 

Appreciate any help..

Regards  Kennedymr2

How Do I Display Special Characters In Vb Eg. &amp;#264;

I am vb developer, i have a problem to display special characters in vb eg. &#264;. How will i display it.

Pls guide me.



How To Include Special Characters

I am using mysql(similar to oracle queries) as my back end for vb application.

My problem is

I am having a Address field in my table .
If i store a value like this "St.Perter's Road" it doesnt insert this value .I know the reason bcoz in our INSERT statement we r using ' symbol.But how to insert values like this


Special Characters In MS ACCESS
 I am using and Ms Access
My db has one field called mydata of type memo
 I have setup the DB connection and everything .
 Now I want to insert some data in DB.

The data could be anything --It could include special characters like &*%$#@()'":>?.

Moreover If I have something on a word document .I can copy it from there and paste it in the textbox..
That includes Bullet points .

I am getting the error on insert statement when I try to insert anything that contains special character.
Please let me know .


Special Characters (ALT + 0153)

I have my VB application installed on two machine - Win XP and Win 2000.

On XP machine, when I entering the code of TM symbol i.e. Alt + 0153 it appears correctly on title bar of the window.

But when I run the same application on Win 2000 machine, the TM character appears as an upside down question mark.

Any idea ??

The backend is oracle database.


Info-Zip And Special Characters
I'm using the Info-Zip libraries for Visual Basic. It's a great code and very usefull, but I have a problem adding files with characters '[' or ']' because the library doesn't match the filename. How could I solve this problem? Also special characters like ,,,,, ... are translated in the zipped file.

Thanks a lot

SirDAS NotreDame

Special Characters In Constants
Is there a way to put special characters (e.g. ESC) to a constant definition.

Const MyConst = chr(27) & "xyz"

won't work, because chr(27) is not a constant

Displaying Special Characters
I want to display some special characters (OMEGA / THETA / PI), as a part of sentence and math equations, as caption of label or text in text box, these sentences / math equation I am getting from MS Access database, please guide me how to display such special characters in VB6. This is very urgent.


Copyright 2005-08, All rights reserved