【问题标题】:Unable to Set the LineStyle Property of the Border Class?无法设置边框类的 LineStyle 属性?
【发布时间】:2016-08-19 16:07:22
【问题描述】:
 With Sheets(1).Range(Cells(row + 1, 1), Cells(row + 1, "V"))
     .Interior.ColorIndex = 48
    ' .Borders (xlInsideHorizontal)
 .LineStyle = xlSlantDashDot
 .Weight = xlThin
 .ColorIndex = 15
 .Font.Name = "Times New Roman"
 .Font.Size = 25
     End With

    .LineStyle = xlSlantDashDot

这是显示错误的行。

是MS office版的吗?

我使用的是 MSofficer 2010 版。

或者这个属性太旧了,我不能用xlSlantDashDot

任何其他excel单元格粗线样式建议?


错误是

XL2002:错误信息:运行时错误 1004:无法设置边框类的 LineStyle 属性

https://support.microsoft.com/en-us/kb/277577

【问题讨论】:

    标签: vba excel


    【解决方案1】:

    如果你打算设置你的范围的边界,那么你需要修改你的行:

    .LineStyle = xlSlantDashDot
    

    到:

    .Borders.LineStyle = xlSlantDashDot
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-02-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多