Showing All Fonts

Ste_Moore01

Active Member
Joined
Jul 13, 2005
Messages
467
Hi guys,

Is there a way that we can make a macro that puts a word in column A with each font that is loaded on the computer?

I could do this manually but it takes ages and is very tedious.

Can anyone help me?
 

Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Try (adapted from Chip Pearson's Symbolizer Add-In):

Code:
Sub ListFonts()
    Dim Ctrl As CommandBarComboBox
    Dim Sh As Worksheet
    Dim F As Long
    Set Ctrl = Application.CommandBars.FindControl(ID:=1728)
    If Not Ctrl Is Nothing Then
        Set Sh = Worksheets.Add
        For F = 1 To Ctrl.ListCount
            Sh.Cells(F, 1) = Ctrl.List(F)
        Next F
    End If
End Sub
 

Ste_Moore01

Active Member
Joined
Jul 13, 2005
Messages
467
That wasn't exactly what I was after but it's helped me to do what I wanted.

Thanks Andrew!
 

DominicB

Well-known Member
Joined
Oct 3, 2005
Messages
1,569
Good morning Ste_Moore01

Is there a way that we can make a macro that puts a word in column A with each font that is loaded on the computer?

Not quite sure I follow exactly what you mean, but does this help :

Code:
Sub ShowFonts()
Set AllFonts = Application.CommandBars("Formatting").FindControl(ID:=1728)
Range("A:A").ClearContents
For n = 0 To AllFonts.ListCount - 1
Cells(n + 1, 1) = "Hello"
Next n
End Sub

For this to work your Formatting toolbar must contain the font control.

HTH

DominicB
 

Watch MrExcel Video

Forum statistics

Threads
1,114,059
Messages
5,545,759
Members
410,704
Latest member
Cobber2008
Top