View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default delete hyperlinks from graphical objects in excel sheet

I put a rectangle on a worksheet and this worked ok:

Option Explicit
Sub testme()

Dim myShape As Shape
Set myShape = Worksheets("sheet1").Shapes("rectangle 1")

On Error Resume Next
myShape.Hyperlink.Delete
On Error GoTo 0

End Sub

v_gyku wrote:

I am trying this coe :

Code:
--------------------

ActiveSheet.Shapes("Organization Chart").Select
Set Shp = Selection.ShapeRange




For i = 1 To Shp.DiagramNode.Diagram.Nodes.Count
Set IShp = Shp.DiagramNode.Diagram.Nodes(i).Shape
On Error Resume Next
If IShp.Hyperlink.Address < "" Then
IShp.Hyperlink.Delete
End If
On Error GoTo 0
Next i

--------------------

--
v_gyku
------------------------------------------------------------------------
v_gyku's Profile: http://www.msusenet.com/member.php?userid=5213
View this thread: http://www.msusenet.com/t-1871070806


--

Dave Peterson