当前位置:首页经验技巧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


免责声明:本站信息来自网络收集及网友投稿,仅供参考,如果有错误请反馈给我们更正,对文中内容的真实性和完整性本站不提供任何保证,不承但任何责任,谢谢您的合作。
版权所有:五学知识网 Copyright © 2015-2025 www.z8000w.com. All Rights Reserved .