Unusual non english characters in vba

lotsbg

Board Regular
Joined
Mar 8, 2004
Messages
110
I need to type the following word in VBA; Příbram, which obviously uses a couple of wierd characters. When I copy and paste the word into VBA I end up with P?íbram.

Obviously VBA doesn't recognise the ř symbol. I have tens of other words like this. Is there anyway for VBA to recognise these symbols somehow?
 
thank you for your reply.

I think VBA is effected by my regional setting (where my language is set to Hebrew for non-unicode)

the ASC(char) gives 63 which is the ASC of real ? and not for my real character...

any idea ??

many thanks
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
I'm also having problems with this. If I could find a table of hex values or anything that will tell me how to get these characters below.

Π λ Δ ⇾ ⇿ ∀ ∴ ∃ □

I would really appreciate it. I would like to know their number so that I can write them into vba.
 
Upvote 0
I'm also having problems with this. If I could find a table of hex values or anything that will tell me how to get these characters below.

Π λ Δ ⇾ ⇿ ∀ ∴ ∃ □

I would really appreciate it. I would like to know their number so that I can write them into vba.

Hi Kyle

A quick way to find the hex code of a character is to copy it to a cell and then execute:

Code:
MsgBox Hex(AscW(Range("A1").Value))
 
Upvote 0
I got an error when I ran that macro. It said wrong number of argument or invalid property assignment. Plus it seems like it doesn't recognize the Hex method, because it changed it to lowercase when I put it in.
 
Upvote 0
I don't see how that can error out.

Try a simple sub with only that statement, like:

Code:
Sub DisplayHexCode()

MsgBox Hex(AscW(Range("A1").Value))

End Sub

or execute it in the Immediate Window.

Remark: Paste this code into a standard module (If it's the first module you insert it's Module1).
 
Upvote 0
ok, that works. thanks. I tried to input that values into the cells with this macro

Range("u10").Value = hex(AscW(2234))

and it didn't work. It turned up value 32, obviously not what I had in mind.
 
Upvote 0
ok, that works. thanks. I tried to input that values into the cells with this macro

Range("u10").Value = hex(AscW(2234))

and it didn't work. It turned up value 32, obviously not what I had in mind.

To input the character with hex code 2234 into the cell use:

Code:
Range("A1").Value = ChrW(&H2234)
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top