Djblois
05-10-2007, 12:25 PM
I don't know what to call this? I am coloring column headings but many times they are different sizes so I am using this:
Sub ColorColumnHeadings(ByVal rngColumnHeading As Range)
With rngColumnHeading
.Font.ColorIndex = 2
.Interior.ColorIndex = 5
.Font.Bold = True
.HorizontalAlignment = xlCenter
End With
End Sub
Sub ColumnHeadingsCommon()
ColorColumnHeadings (Range(Range("IV1").End(xlToLeft), "A1"))
'With Range(Range("IV1").End(xlToLeft), "A1")
' .Font.ColorIndex = 2
' .Interior.ColorIndex = 5
' .Font.Bold = True
' .HorizontalAlignment = xlCenter
'End With
End Sub
the commented out code is the code I am trying to get rid of. Currently it is giving me an error. I don't even know how to look this up in the help files or search on here? What is it called when you use (byval ??????? by ?????)?
Sub ColorColumnHeadings(ByVal rngColumnHeading As Range)
With rngColumnHeading
.Font.ColorIndex = 2
.Interior.ColorIndex = 5
.Font.Bold = True
.HorizontalAlignment = xlCenter
End With
End Sub
Sub ColumnHeadingsCommon()
ColorColumnHeadings (Range(Range("IV1").End(xlToLeft), "A1"))
'With Range(Range("IV1").End(xlToLeft), "A1")
' .Font.ColorIndex = 2
' .Interior.ColorIndex = 5
' .Font.Bold = True
' .HorizontalAlignment = xlCenter
'End With
End Sub
the commented out code is the code I am trying to get rid of. Currently it is giving me an error. I don't even know how to look this up in the help files or search on here? What is it called when you use (byval ??????? by ?????)?