excel怎么任意画框

excel怎么任意画框

Sub DrawBox()

Dim ws As Worksheet

Set ws = ThisWorkbook.Sheets("Sheet1")

'定义框的起始和结束单元格

Dim startCell As Range

Dim endCell As Range

Set startCell = ws.Range("B2")

Set endCell = ws.Range("E5")

'绘制边框

With ws.Range(startCell, endCell).Borders(xlEdgeLeft)

.LineStyle = xlContinuous

.Weight = xlThin

.ColorIndex = 0

End With

With ws.Range(startCell, endCell).Borders(xlEdgeTop)

.LineStyle = xlContinuous

.Weight = xlThin

.ColorIndex = 0

End With

With ws.Range(startCell, endCell).Borders(xlEdgeBottom)

.LineStyle = xlContinuous

.Weight = xlThin

.ColorIndex = 0

End With

With ws.Range(startCell, endCell).Borders(xlEdgeRight)

.LineStyle = xlContinuous

.Weight = xlThin

.ColorIndex = 0

End With

End Sub

你可能也喜欢

微软大手笔!《古墓丽影崛起》限时独占曾花费1亿美元
雷丁带什么兵
be365是否安全

雷丁带什么兵

📅 07-05 👀 8802
世界杯彩票出票好慢,世界杯彩票出票好慢啊
365bet官方投注网站

世界杯彩票出票好慢,世界杯彩票出票好慢啊

📅 07-28 👀 1014
大漠插件 win10 绑定
365bet官方投注网站

大漠插件 win10 绑定

📅 07-19 👀 5596
鹣鲽情深的意思
365bet365娱乐场

鹣鲽情深的意思

📅 07-24 👀 9095
北角海戰
365bet365娱乐场

北角海戰

📅 07-11 👀 7523
华为MT7如何实现高效截屏?(掌握华为MT7截屏技巧,轻松记录生活点滴)
《h1z1》怎么开车 h1z1车辆具体获取方法一览
be365是否安全

《h1z1》怎么开车 h1z1车辆具体获取方法一览

📅 07-03 👀 9692
win7官方旗舰版镜像iso文件下载地址合集
be365是否安全

win7官方旗舰版镜像iso文件下载地址合集

📅 06-28 👀 3917