求使用对象方法,给指定EXCEL单元格画边框的语句(需要这个:xlSlantDashDo):要求类似以下语句:
Excel对象.读对象型属性 (“Sheets”, ).读对象型属性 (“Item”, 1).方法 (“Activate”, ) ——’激活第一个工作表
Excel工作表对象.读对象型属性 (“Range”, “A1”).写属性 (“RowHeight”, 10)————设置单元格A1行高10
BorderAround 方法
向单元格区域添加边框,并设置该边框的 Color、LineStyle 和 Weight 属性。 语法 expression.BorderAround(LineStyle, Weight, ColorIndex, Color) expression 必选。该表达式返回一个 Range 对象。 LineStyle Variant 类型,可选。边框的线条样式。可为下列 XlLineStyle 常量之一:<xlContinuous、xlDash、xlDashDot、xlDashDotDot、xlDot、xlDouble、xlLineStyleNone 或 xlSlantDashDot。默认值为 xlContinuous。 Weight Variant 类型,可选。边框的粗细。可为下列 XlBorderWeight 常量之一: xlHairline、xlThin、xlMedium 或 xlThick。默认值为 xlThin。 ColorIndex Variant 类型,可选。边框的颜色,为当前调色板中颜色的编号,或下列 XlColorIndex 常量之一: xlColorIndexAutomatic 或 xlColorIndexNone。 Color Variant 类型,可选。以 RGB 值指定边框的颜色。 说明 必须指定 ColorIndex 或者 Color,但不能同时指定这两者。 可指定 LineStyle 或 Weight,但不能同时指定这两者。如果未指定任何参数,Microsoft Excel 将使用默认的线条样式和粗细。
参数翻译:
xlContinuous :实线。 xlDash :虚线。
xlDashDot:点划相间线。
xlDashDotDot:划线后跟两个点。
xlDot :点线。
xlDouble:双线。
xlLineStyleNone:无线条。
xlSlantDashDot :倾斜的划线
|