VBA案例精选 获取指定单元格边框格式
代码运行结果:
代码截图:
代码文本:
Public Sub 技巧()
Dim myRange As Range
Set myRange = Range("A1") '指定任意的单元格
MsgBox "单元格" & myRange.Address & "的内部对象如下:" _
& vbCrLf & "框线颜色:" & myRange.Borders.ColorIndex _
& vbCrLf & "框线类型:" & myRange.Borders.LineStyle _
& vbCrLf & "框线粗细:" & myRange.Borders.Weight
Set myRange = Nothing
End Sub
注释:
赞 (0)