Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dsplaying unicode in a Form

Tags:

excel

vba

After much trial and error ,and with assistance from the community, the ability to use Unicode in a form has not been very successful. So the question is. Is there a method to have the ability to use Unicode within a form ? primarily in textbox control were a currency symbol like the Peso symbol(₱) will appear in a textbox. there are various ways to have it on a worksheet but in a form is an allusive task.

like image 237
Wayne Seymour Avatar asked Oct 01 '18 13:10

Wayne Seymour


2 Answers

After much trial and error ,and with assistance from the community, the ability to use Unicode in a form has not been very successful.

Says who? :)

Private Sub UserForm_Initialize()
    TextBox1.Text = ChrW(8369)
End Sub

enter image description here

And welcome to stackoverflow :)

like image 176
Siddharth Rout Avatar answered Sep 23 '22 13:09

Siddharth Rout


screen shot

Among other methods, you could:

  • copy & paste Unicode into a textbox, or,
  • or use ChrW to use a specific character like this:

    UserForm1.TextBox1 = ChrW(8369)  'puts a ₱ in the text box.
    

Note that in most cases the VBA Editor (VBE) won't display Unicode (so copy/pasting the above code into your VBE will replace the with a ?).

By the way CodePoints is a handy site for finding/identifying unicode symbols. Type whatever you're looking for in the search bar, or copy & paste from a website to find out more.

Also, note that all symbols that appear on your system may or or may not render properly on others.

like image 34
ƬƦƖƝƛ Avatar answered Sep 23 '22 13:09

ƬƦƖƝƛ