乔山办公网我们一直在努力
您的位置:乔山办公网 > excel表格制作 > 宏 excel表格加边框-excel边框宏,excel怎么添加边框

宏 excel表格加边框-excel边框宏,excel怎么添加边框

作者:乔山办公网日期:

返回目录:excel表格制作


Sub 图片zhidao加边()
ActiveSheet.Shapes.SelectAll
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 3
End With
End Sub

Private Sub CommandButton1_Click()
'从第一格zd开始的表
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

在Excel中设置边框和底纹的copy方法:

1、选择数据区域,鼠标右键选择设置单元格格式;

2、选择边框选项卡,点外边框;

点内部,点确定;

3、点填充选项卡,选择一种颜色;

或者点填充效果;

4、如果前面点的是填充效果的话,弹出如下窗口,颜色1:选择一种颜色;

颜色2:选择另一种颜色;

底纹样式:选择一种样式,点确定;

5、返回到上一级窗口,点确定。



Sub aaa()
irow = Range("A65536").End(xlUp).Row
icol = Range("iv1").End(xlToLeft).Column
Range(Cells(1, 1), Cells(irow, icol)).Borders.LineStyle = xlContinuous
End Sub

相关阅读

关键词不能为空
极力推荐

ppt怎么做_excel表格制作_office365_word文档_365办公网