- ·上一篇:excel表格三角形按钮怎么做
- ·下一篇:excel表格的标题怎么打
excel表格宏怎么添加框
2025-04-25 10:00:08
1.宏 excel表格加边框
Private Sub CommandButton1_Click()
'从第一格开始的表
Range("a1").Select
'选定整个表格
UsedRange.Select
'设置边框
With Selection
.Borders(xlEdgeLeft).LineStyle = xlContinuous
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Borders(xlEdgeRight).LineStyle = xlContinuous
.Borders(xlInsideVertical).LineStyle = xlContinuous
.Borders(xlInsideHorizontal).LineStyle = xlContinuous
End With
End Sub