Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete 1 row of objects, not all on sheet Excel 2007 | Excel Discussion (Misc queries) | |||
Macros (Graphical Objects) ?? | Excel Discussion (Misc queries) | |||
Macro's and Graphical Objects | Excel Discussion (Misc queries) | |||
Arranging graphical objects on sheet | Excel Programming | |||
Unable to remove Sheet objects in the Microsoft Excel Objects | Excel Programming |