Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
with, end with format
greetings, simple question, if i have following code:
Range("b2:c12").Select With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .Weight = xlHairline .ColorIndex = xlAutomatic End With is there way i can apply LineStyle, Weight, ColorIndex options to each border with one With, End With statement (or some other way where don't have to repeat lines? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
with, end with format
How about this...
With Range("B2:C12") .BorderAround LineStyle:=xlContinuous, Weight:=xlMedium With .Borders(xlInsideHorizontal) .LineStyle = xlContinuous .Weight = xlHairline End With End With -- HTH... Jim Thomlinson "mwam423" wrote: greetings, simple question, if i have following code: Range("b2:c12").Select With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .Weight = xlHairline .ColorIndex = xlAutomatic End With is there way i can apply LineStyle, Weight, ColorIndex options to each border with one With, End With statement (or some other way where don't have to repeat lines? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
with, end with format
hi jim, that foots the bill nicely =D
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lock Cell Format - Allow copy and paste of data without format change | Excel Worksheet Functions | |||
Code Date Format Depending on Computer format | Excel Discussion (Misc queries) | |||
Decide comment format 'globally'? Restore format with ws_change? | Excel Discussion (Misc queries) | |||
Replace million-billion number format to lakhs-crores format | Excel Discussion (Misc queries) | |||
how to format excel format to text format with separator "|" in s. | New Users to Excel |