View Single Post
 
Old 08-28-2024, 03:34 AM
MartinGM MartinGM is offline Windows 11 Office 2021
Competent Performer
 
Join Date: May 2023
Location: England
Posts: 108
MartinGM is on a distinguished road
Default Mystery with ASCII characters

This is doing my head in ! A have a worksheet whose font is entirely Arial Narrow.

I wanted to create a "block" character in a cell so I went to Symbols and inserted the one I wanted. Then I read it in VBA to see what its ASCII number was - it is character 166 and looks like this: █

But when I use VBA to write character 166 in another cell it shows up as this: ¦

So now I have two cells with the same font and the above two different symbols in them - and when I read their ASCII character numbers using VBA they both show 166.

How can this be ?

PS If I read the value of the █ cell into VBA then write that to the target cell it shows up as █, as it should.
Reply With Quote