[EXCEL高手进]Excel单元格或者行的格式的copy
有一个模版的excel表格,每往里插入一行数据,就要把上一行的格式copy下来,但是,只copy表格左边,右边和下边的线,上面的线保持原来的不变。请问怎么用vb实现!!谢谢!!! --------------------编程问答-------------------- 录制excel的宏,在vb中调用 --------------------编程问答-------------------- 录制excel的宏,看宏中的代码,试着修改后使用! --------------------编程问答-------------------- vSheet.Range("A1:A1").Borders(xlDiagonalDown).LineStyle = xlNonevSheet.Range("A1:A1").Borders(xlDiagonalUp).LineStyle = xlNone
With vSheet.Range("A1:A1")..Borders(xlEdgeLeft)'左边的边框
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With vSheet.Range("A1:A1")..Borders(xlEdgeTop)'上边的边框
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With vSheet.Range("A1:A1")..Borders(xlEdgeRight)'右边的边框
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With vSheet.Range("A1:A1")..Borders(xlEdgeBottom)'下边的边框
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
单个的单元格
补充:VB , 基础类