我的代码无法修改形状可视性...您可以帮助吗?
已经命名了一个单元格[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
尝试此
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