# 最快速简单的方法....

Posted by 小Sam on March 30, 1999 at 15:04:47:

In Reply to: VB for EXCEL (如何框线) posted by Gordon.Liu on March 29, 1999 at 11:56:18:

Range("E4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With

吓一跳吧!!
开玩笑的,如果真要你动手写那么一串的程式,
那哪叫快速简单呢?

不过上面程式五秒钟就可以＂变出来″,
方法真的很简单:

工具->巨集->录制新巨集
选个栏位,画个四角框
结束录制巨集

就这样,VBA就自动写好了,
几乎可以在Excel里作的动作都可以被录制起来!
帅吧!
所以根本不必死记程式码,
管它什么 Word VBA,Power Point VBA....
全部搞定!

Follow Ups: