Reputation: 31
How do I enter special characters in Excel VBA? For example if I want "●" (large interpunct) in some strings, they all appear as "?". I tried to substitute all "●" with ●
in VBA but it didn't work, simply displayed ●
in the string.
Upvotes: 1
Views: 14720
Reputation: 989
Reference Website - Unicode and VBA’s ChrW() and AscW() functions
Here the code for bullet et strong bullet. Use hexadecimal in lieu of long.
Sub DisplayBullet()
Cells(1, 1).Value = "This is a bullet - " & ChrW(8226)
Cells(2, 1).Value = "This is a strong bullet - " & ChrW(&H25CF)
End Sub
Important: If you try to display in a MsgBox it's not working.
Upvotes: 2