0

i want to see all the installed font name using for each loop.i have
written a code but it say object required.and it break at bold line.
kindly let me know any idiea?

Private Sub Form_Load()
Dim f As Font
B]For Each f In Fonts[/B]
    MsgBox f.Name
   Next
2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by vb5prgrmr
0

Can't use a for each...

Dim I As Integer
For I = 0 To Printer.FontCount - 1
  Combo1.AddItem Printer.Fonts(I)
Next I

For I = 0 To Screen.FontCount - 1
  Combo2.AddItem Screen.Fonts(I)
Next I

I believe that screen.fonts will return more fonts (at least on my computer). Check the count on yours. Also, they do not come ordered so you should make sorted = true.


Good Luck

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.