- 帖子
- 19
- 主題
- 6
- 精華
- 0
- 積分
- 26
- 點名
- 0
- 作業系統
- Win7
- 軟體版本
- office2013
- 閱讀權限
- 10
- 註冊時間
- 2015-8-13
- 最後登錄
- 2017-4-11
|
有查到繪製格線的語法為手動方式繪製格線
Sub 繪製外框線()
MsgBox “在所選取的儲存格範圍四周繪製外框線”
With Selection
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Borders(xlEdgeLeft).LineStyle = xlContinuous
.Borders(xlEdgeRight).LineStyle = xlContinuous
End With
End Sub
假設表格如下
A B C D E
1 2 3 4 5
6 7 8 9 1
固定左上A4則J欄則判斷最後一欄有值為繪製範圍,例如J20,可否使用判斷是繪製格線? |
|