Formatting Text to Italic AND Underlined to individually listed cells
Thanks Dave.
I did have the Italic set to TRUE but i changed it back to FALSE to see if i
accedently had the entire sheet in italic.
"Dave Peterson" wrote in message
...
If you want Italic, I would think that True would work better than False.
And watch your with/end with statements.
I bet you want something more like:
Option Explicit
Sub testme()
Dim rng As Range
Set rng = Range("A1,B1,D1,F1,B2,E2,B3,C3,D3,E3,F3,G3,H3,I3")
With rng
.Font.Italic = True
.Font.Underline = True
End With
Range("A1").Value = "Roll#"
Range("B1").Value = "Customer"
Range("D1").Value = "Date"
Range("F1").Value = "Belt Type"
Range("B2").Value = "ST Job No."
Range("E2").Value = "Inspectors Names"
Range("B3").Value = "Item No."
Range("C3").Value = "Section Length"
Range("D3").Value = "Width"
Range("E3").Value = "Belt Type"
Range("F3").Value = "Top Cover"
Range("G3").Value = "Bottom Cover"
Range("H3").Value = "Event Type"
Range("I3").Value = "Comments/Stamp Id's"
End Sub
Corey wrote:
I am trying to set the below listed cells to have the values displayed in
Italic AND Underlined.
Nothing seems to happen with the below???
ActiveSheet.Select
Dim rng As Range
Set rng = Range("A1,B1,D1,F1,B2,E2,B3,C3,D3,E3,F3,G3,H3,I3")
With rng
Font.Italic = False
Font.Underline = True
Range("A1").Value = "Roll#"
Range("B1").Value = "Customer"
Range("D1").Value = "Date"
Range("F1").Value = "Belt Type"
Range("B2").Value = "ST Job No."
Range("E2").Value = "Inspectors Names"
Range("B3").Value = "Item No."
Range("C3").Value = "Section Length"
Range("D3").Value = "Width"
Range("E3").Value = "Belt Type"
Range("F3").Value = "Top Cover"
Range("G3").Value = "Bottom Cover"
Range("H3").Value = "Event Type"
Range("I3").Value = "Comments/Stamp Id's"
End With
Did i miss something?
Corey....
--
Dave Peterson
|