I recently had cause to develop a UserForm, to be called from Excel, that would allow a user to select a symbol from a group of favorites. Not wanted to use an ActiveX control, I placed 40 textboxes on the form, in rows of 10 each. The idea was I would set the font and character at runtime, reading from a list stored in Excel.
There was a problem. If the font was different from that set at design-time, the symbol would be incorrect, generally showing up as a standard alphanumeric character. After about 2 hours of frustration and searching the web, I found the solution. There is a little documented font property (it wasn’t mentioned in the help files at all) called charset. This property is 0 for normal character sets and needs to be set to 2 for Symbol characters to show up. Example:
Textbox1.Font.Name ="Wingdings" Textbox1.Font.Charset = 2
Once I did this, the symbols would show up normally.
Comments Off on Inserting Symbol Fonts In A Textbox On A UserForm