Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default delete hyperlinks from graphical objects in excel sheet


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_gyk
-----------------------------------------------------------------------
v_gyku's Profile: http://www.msusenet.com/member.php?userid=521
View this thread: http://www.msusenet.com/t-187107080

  #2   Report Post  
Posted to microsoft.public.excel.programming
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default delete hyperlinks from graphical objects in excel sheet


I got this code:
But not removing hyperlink from organization chart.


Code
-------------------

Dim objexcel As Excel.Application
Dim objworksheet As Excel.Worksheet
Dim objworkbook As Excel.Workbooks

Private Sub cmddelete_Click()
Set objexcel = CreateObject("Excel.Application")
objexcel.Workbooks.Open ("c:\test hyper.xls")
objexcel.WindowState = xlMinimized
objexcel.WindowState = xlMaximized


Dim Shp As Excel.ShapeRange
Dim IShp As Excel.Shape
Dim i As Integer
Dim j As Integer
On Error GoTo ResNextShp


For j = 1 To objexcel.ActiveSheet.Shapes.Count

objexcel.ActiveSheet.Shapes(j).Select
Set Shp = Selection.ShapeRange
If Shp.HasDiagramNode = msoTrue Then
For i = 1 To Shp.DiagramNode.Diagram.Nodes.Count
Set IShp = Shp.DiagramNode.Diagram.Nodes(i).Shape
If IShp.Hyperlink.Address < "" Then
IShp.Hyperlink.Delete
End If
Next i
End If
Set IShp = objexcel.ActiveSheet.Shapes(j)
If IShp.Hyperlink.Address < "" Then
IShp.Hyperlink.Delete
End If
Next j
i = 0

For i = objexcel.ActiveSheet.Hyperlinks.Count To 1 Step -1
objexcel.ActiveSheet.Hyperlinks(i).Delete
Next i

Exit Sub

ResNextShp:
Resume Next

End Sub


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

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default delete hyperlinks from graphical objects in excel sheet

Hi Dave !
I want to tell u somthn.Sorry but I have not mentioned it in the last
post.
Its working fine for rectngles.Not wotking for organization charts.

I give you the code i have written:

Dim objexcel As Excel.Application
Dim objworksheet As Excel.Worksheet
Dim objworkbook As Excel.Workbooks

Private Sub cmddelete_Click()
Set objexcel = CreateObject("Excel.Application")
objexcel.Workbooks.Open ("c:\test hyper.xls")
objexcel.WindowState = xlMinimized
objexcel.WindowState = xlMaximized


Dim Shp As Excel.ShapeRange
Dim IShp As Excel.Shape
Dim i As Integer
Dim j As Integer
On Error GoTo ResNextShp


For j = 1 To objexcel.ActiveSheet.Shapes.Count

objexcel.ActiveSheet.Shapes(j).Select
Set Shp = Selection.ShapeRange
If Shp.HasDiagramNode = msoTrue Then
For i = 1 To Shp.DiagramNode.Diagram.Nodes.Count
Set IShp = Shp.DiagramNode.Diagram.Nodes(i).Shape
If IShp.Hyperlink.Address < "" Then
IShp.Hyperlink.Delete
End If
Next i
End If
Set IShp = objexcel.ActiveSheet.Shapes(j)
If IShp.Hyperlink.Address < "" Then
IShp.Hyperlink.Delete
End If
Next j
i = 0

For i = objexcel.ActiveSheet.Hyperlinks.Count To 1 Step -1
objexcel.ActiveSheet.Hyperlinks(i).Delete
Next i

Exit Sub

ResNextShp:
Resume Next

End Sub

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default delete hyperlinks from graphical objects in excel sheet


I have attached my project here.
Its just opening exel file and removing hyperlinks in it.
But it's not removing links from organization chart..

+-------------------------------------------------------------------
|Filename: v_gyku_hyperlink.zip
|Download: http://www.excelforum.com/attachment.php?postid=3848
+-------------------------------------------------------------------

--
v_gyk
-----------------------------------------------------------------------
v_gyku's Profile: http://www.excelforum.com/member.php...fo&userid=2746
View this thread: http://www.excelforum.com/showthread.php?threadid=46957



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default delete hyperlinks from graphical objects in excel sheet


Hey guys none of you have solution for this problem?

I have seacrched a lot and tried also.. but can't get to it?

noone have given for organization chart or cycle chart...

If anyone has pls let me know....

Thanks...


--
v_gyku
------------------------------------------------------------------------
v_gyku's Profile: http://www.excelforum.com/member.php...o&userid=27469
View this thread: http://www.excelforum.com/showthread...hreadid=469577

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default delete hyperlinks from graphical objects in excel sheet

I don't connect through excelforum, so I can't see your attachment.

And I don't open attachments.

Maybe someone else will chime in.

v_gyku wrote:

I have attached my project here.
Its just opening exel file and removing hyperlinks in it.
But it's not removing links from organization chart...

+-------------------------------------------------------------------+
|Filename: v_gyku_hyperlink.zip |
|Download: http://www.excelforum.com/attachment.php?postid=3848 |
+-------------------------------------------------------------------+

--
v_gyku
------------------------------------------------------------------------
v_gyku's Profile: http://www.excelforum.com/member.php...o&userid=27469
View this thread: http://www.excelforum.com/showthread...hreadid=469577


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default delete hyperlinks from graphical objects in excel sheet

v_gyku,
According to the Object Browser with Excel 2000, there is no such thing as
"DiagramNode" for a ShapeRange.
There are "ShapeNodes" and "Nodes" collections however. Is that what you
mean ?
Don't know about later versions.

If on the other hand, you mean the Organisational Chart that can be inserted
in a WS, then AFAIK you cannot manipulate the elemets from VBA because they
not part of Excel.

NickHK

"v_gyku" wrote in message
...

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete 1 row of objects, not all on sheet Excel 2007 Paula Excel Discussion (Misc queries) 11 October 6th 09 05:40 PM
Macros (Graphical Objects) ?? Sunday88310 Excel Discussion (Misc queries) 0 March 19th 07 07:05 PM
Macro's and Graphical Objects Sunday88310 Excel Discussion (Misc queries) 3 March 19th 07 05:14 PM
Arranging graphical objects on sheet quartz[_2_] Excel Programming 2 January 12th 05 05:44 PM
Unable to remove Sheet objects in the Microsoft Excel Objects Adrian[_7_] Excel Programming 1 August 26th 04 10:49 PM


All times are GMT +1. The time now is 02:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"