Working With Cells

You use the XlLineStyle constant values, outlined in the table, to specify the type of line to draw as the border for the range of cells.

You use the XlBorderWeight constant values, xlHairline, xlMedium, xlThick, and xlThin, to specify the width of the line used to draw the border for the range of cells. The type of line drawn is based upon the XlLineStyle parameter value.

CONSTANT

DESCRIPTION

xlContinuous

Default value. Draws a continuous line around the range of cells.

xlDash

Draws a dashed line around the range of cells.

xlDashDot

Draws a broken line using the pattern dash and then dot.

xlDashDotDot

Draws a broken line using the pattern dash, dash, and dot.

xlDot

Draws a dotted line around the range of cells.

xlDouble

Draws a double continuous line around the range of cells.

xlLineStyleNone

Does not modify the line style.

xlSlantDashDot

Draws a broken line in a dash dot pattern using a slanted line.

Xllinestyle Xlslantdashdot

□ Switch to Excel and run the macro.

Type LineStyle:=xlDouble, replacing xlDouble with the XlLineStyle constant for the desired line style.

□ Type Color:=RGB(250, 120, 220), replacing 250, 120, 220 with the Red, Green, and Blue values for the desired line color.

ype Weight:=xlThick, replacing xlThick with the appropriate XlBorderWeight constant.

□ Switch to Excel and run the macro.

■ Excel draws a border around the specified cells.

■ Excel draws a border around the specified cells.

0 0

Post a comment