Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • Last Modified:

Display items in their own fonts inside the combobox????

Hello! There

I need help from you guys. I have created a combo box which act as command bar using VBA code. The problem is that I need to display the items inside the combo box in their respective fonts instead of English. Other fonts are already installed in my system.
Thanks at the earliest.
0
trojanhacker
Asked:
trojanhacker
2 Solutions
 
bhagyeshtCommented:
if u can easily do it using the control tools, goto show toolbar, then select the control toolbox, then add a combobox, once added right click on it and set the font. thats it.
0
 
JoaTexCommented:
Hi
 In this litlle example put the language in combo1 and combo2 will show font of selected language.

put 2 combobox in a form.

code:

Option Explicit
Dim test(3) As String
Dim Estil(3) As String
Dim N
Private Sub Combo1_Click()
   Combo2.Clear
   Combo2.FontName = Combo1.List(Combo1.ListIndex)
      For N = 0 To 2
         Combo2.AddItem test(N)
      Next N
   Combo2.Text = "Test"
End Sub

Private Sub Form_Load()
   For N = 0 To 2
      test(N) = "Test" & N + 1
      Select Case N
         Case Is = 0
            Estil(N) = "Arial Black"
         Case Is = 1
            Estil(N) = "Times New Roman"
         Case Is = 2
            Estil(N) = "Ms Serif"
      End Select
      Combo1.AddItem Estil(N)
   Next N
End Sub

hope it suites you
Jo
0
 
CleanupPingCommented:
trojanhacker:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now