turtlejack
Technical User
This code isnt working.. I want to make all of the cells in the selected range(using the variables of course)formatted to the bold and underlined font.but, I keep getting an error. any help would be appreicated..
Sub projectamend()
Dim num2 As Worksheet
Dim p As Long
p = 20
Set num2 = Worksheets("2")
Sheets(num2).Range("a5", "a" & p).Select
Selection.font.Bold = True
Selection.font.Underline = xlUnderlineStyleSingle
With Selection.font
.Name = "Times New Roman"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleSingle
.ColorIndex = xlAutomatic
End With
End Sub
Sub projectamend()
Dim num2 As Worksheet
Dim p As Long
p = 20
Set num2 = Worksheets("2")
Sheets(num2).Range("a5", "a" & p).Select
Selection.font.Bold = True
Selection.font.Underline = xlUnderlineStyleSingle
With Selection.font
.Name = "Times New Roman"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleSingle
.ColorIndex = xlAutomatic
End With
End Sub