我的代码无法修改形状可见性......你能帮忙吗?
已命名单元格[test]并希望线条标注形状根据单元格中的值显示/消失。 1 =可见0 =不可见
Sub Macro1()
Dim ws As Worksheet
With ws.Shapes.Range(Array("Line Callout 1 1"))
.Fill.Visible = [test]
.Line.Visible = [test]
End With
End Sub
答案 0 :(得分:1)
试试这个
Sub Macro1()
Dim ws As Worksheet
Set ws = ThisWorkbook.ActiveSheet
With ws.Shapes.Range(Array("Line Callout 1 1"))
.Fill.Visible = Range("test")
.Line.Visible = Range("test")
End With
End Sub