O
Otto Moehrbach
Excel XP & Win XP
I have the following code to place a black thin border around every cell in
the range, and a thick colored border around (outline) the whole range. I
get an error "Object Required" on the first line and would probably get the
same error on the second line if the code got past the first line. What is
the proper syntax/code to do what I want? Thanks for your time. Otto
With ws
.["F1:H6"].Borders LineStyle:=xlContinuous, Weight:=xlThin,
ColorIndex:=xlAutomatic
.["F1:H6"].BorderAround LineStyle:=xlContinuous,
Weight:=xlThick, ColorIndex:=9
.["F1:H6"].Interior.ColorIndex = 36
End With
I have the following code to place a black thin border around every cell in
the range, and a thick colored border around (outline) the whole range. I
get an error "Object Required" on the first line and would probably get the
same error on the second line if the code got past the first line. What is
the proper syntax/code to do what I want? Thanks for your time. Otto
With ws
.["F1:H6"].Borders LineStyle:=xlContinuous, Weight:=xlThin,
ColorIndex:=xlAutomatic
.["F1:H6"].BorderAround LineStyle:=xlContinuous,
Weight:=xlThick, ColorIndex:=9
.["F1:H6"].Interior.ColorIndex = 36
End With