Add list of Font Names to ComboBox
Posted by JAF on December 27, 2001 8:10 AM
I have a UserForm which contains a ComboBox.
What I'd like to do is to have the CobmoBox populate with a list of the installed fonts on the PC on which the spreadsheet is opened.
I can get the ComboBox to fill with numbers, but not with names see code below.
I'm sure it's a simple matter to get the font names, but I just can't figure it out!!
Any suggestions??
JAF
---------------------------------------------------
Private Sub UserForm_Initialize()
'currently adds numbers - I need font names!!
Me.cboFont.Clear
Set FontList = Application.CommandBars("Formatting").FindControl(ID:=1728)
For i = 0 To FontList.ListCount - 1
Me.cboFont.AddItem i
Next i
End Sub