作者:乔山办公网日期:
返回目录: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