以a1;c3区域为例 Range("A1:C3").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft) ‘画左边竖线
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop) ’画上面横线
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeBottom).LineStyle = xlNone‘不画下面横线
Selection.Borders(xlEdgeRight).LineStyle = xlNone ’不画右面竖线
Selection.Borders(xlInsideVertical).LineStyle = xlNone ‘不画内部竖线
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone ’不换内部横线
End Sub应该能理解把
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft) ‘画左边竖线
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop) ’画上面横线
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeBottom).LineStyle = xlNone‘不画下面横线
Selection.Borders(xlEdgeRight).LineStyle = xlNone ’不画右面竖线
Selection.Borders(xlInsideVertical).LineStyle = xlNone ‘不画内部竖线
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone ’不换内部横线
End Sub应该能理解把
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货