2016-08-19 26 views
0
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 

這是示出了錯誤的行。無法設置邊框類的LineStyle屬性?

這是關於MS Office版本嗎?

我使用MS官員2010版本。

或此屬性太舊,我不能使用xlSlantDashDot

建議的其他任何Excel單元格粗線條樣式?


的錯誤是

XL2002:錯誤消息:運行時錯誤1004:無法設置邊框類

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

回答

1

的LineStyle屬性如果您打算設置你的範圍的邊界,那麼你需要修改你的線:

.LineStyle = xlSlantDashDot 

到:

.Borders.LineStyle = xlSlantDashDot