• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

List Worksheets Code for Font and Size

JenniferS

Member
Hello,

Can the font and size of the worksheet names from this code be:

bookman old style and size 16 bold


Thank you


Code:
Sub ListSheets()

Dim ws As Worksheet
Dim x As Integer

x = 3

Sheets("Menu").Range("A3:A20").Clear

For Each ws In Worksheets

   Sheets("Menu").Cells(x, 1).Select
   ActiveSheet.Hyperlinks.Add _
   Anchor:=Selection, Address:="", SubAddress:= _
   ws.Name & "!A1", TextToDisplay:=ws.Name
   x = x + 1

Next ws

End Sub
 

JenniferS

Member
I found a way but it might be a longer method:

I recorded Macro 1 and called it at the end of this code

Code:
Sub Macro1()
'
' Macro1 Macro
'

'
    Columns("A:A").Select
    With Selection.Font
        .Name = "Bookman Old Style"
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .TintAndShade = 0
        .ThemeFont = xlThemeFontNone
    End With
    With Selection.Font
        .Name = "Bookman Old Style"
        .Size = 14
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .TintAndShade = 0
        .ThemeFont = xlThemeFontNone
    End With
    Selection.Font.Bold = False
    Selection.Font.Bold = True
End Sub
 
Top