如何删除图表超链接?
我尝试过以下代码,但似乎没有删除链接。
ActiveSheet.ChartObjects(1).Activate
ActiveChart.Hyperlinks.Delete
答案 0 :(得分:0)
这样的事情应该有效:
Dim i As Long
Dim c As Chart
'Set c = ActiveChart ' or...
Set c = ActiveSheet.ChartObjects(1).Chart
'add hyperlink
c.Hyperlinks.Add Anchor:=Selection.ShapeRange.Item(1), Address:="", _
SubAddress:= "'Product'!A1"
'now remove hyperlink
With c.Hyperlinks
For i = .Count To 1 Step -1
.Item(i).Delete
Next i
End With
如您所见,我一个接一个地删除超链接,从最后一个向后倒数。