VBA UserForm - label caption font is not being set

On a UserForm I have a label control where I want to put the caption 'right arrow symbol'. That would be   ¶ in the font Wingdings 3

I used this code

   
Dim cCont4 As Control

Open in new window


and looping over items in an array, with index i
  
        Set cCont4 = Frame1.Controls.Add("Forms.Label.1", "CopyOf")

      With cCont4
            .Caption = "¶"
            .Font.Name = "Wingdings 3"
            .AutoSize = True
            .Top = i * 22
            .Left = 390
            .Width = 60
            .Name = "lblPreview" & arrSections(1, i)
        End With

Open in new window


The Font isn't being set to "Wingdings 3"

I can't figure out why that is. Tried other fonts also. Still shows "¶"

What am I doing wrong?
Thanks
hindersalivaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NorieAnalyst Assistant Commented:
Can you add such a label manually when in design view?
0
hindersalivaAuthor Commented:
Yes, Norie.
0
NorieAnalyst Assistant Commented:
What happens if you use Chr(34) instead of "¶"?
 Set cCont4 = Frame1.Controls.Add("Forms.Label.1", "CopyOf")

 With cCont4
     .Caption = Chr(34)
     .Font.Name = "Wingdings 3"
     .AutoSize = True
     .Top = i * 22
     .Left = 390
     .Width = 60
     .Name = "lblPreview" & arrSections(1, i)
End With

Open in new window

0
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

hindersalivaAuthor Commented:
Norie, that works!
So what is Chr() for right arrow?
Sample of arrow
0
NorieAnalyst Assistant Commented:
I looked up right arrow in a WingDings 3 character set and it gave me Chr(34), is that not the one you want?
0
hindersalivaAuthor Commented:
Chr(34) gives me " (double quotes)
0
Martin LissOlder than dirtCommented:
There are several values that will give you a right arrow in Wingdings 3 and two of them are 'a' and 'g'. Make sure you put the setting of the font name prior to the setting of the character.
            .Font.Name = "Wingdings 3"
            .Caption = "g"

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NorieAnalyst Assistant Commented:
I think Martin might have spotted something there with setting the font before caption.
0
hindersalivaAuthor Commented:
That's great Martin!
The 'a' gives me a hollow right arrow. Any way for a solid one?

Doesn't work with "¶" though/
0
Martin LissOlder than dirtCommented:
I get this (using .Font.Size = 36)
Cursor_and_UserForm1.jpg

But go here.
0
Martin LissOlder than dirtCommented:
Edit: I used g.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Fonts Typography

From novice to tech pro — start learning today.