Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Object hyperlink

Hi Guys,

I have a worksheet with many objects & images with hyperlinks.

All that i need is a list of all the hyperlinks in a worksheet.

Can anybody help me.

Thanks,
Thyagaraj
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Object hyperlink

Thyag,

I have tried something. I hope this solves your problem... Copy the
following code and copy in a new code module in excel.

Option Explicit
Dim MainSht, ResultSht As Worksheet
Dim i, x As Integer

Sub Get_Hyperlinks()
Set MainSht = ActiveSheet
If Find_Sht_Exists = False Then
Set ResultSht = Sheets.Add
ResultSht.Name = "Link_" & MainSht.Name
ResultSht.Cells(1, 1) = "Object Name"
ResultSht.Cells(1, 2) = "Hyperlink name"
ResultSht.Range(Cells(1, 1), Cells(1, 2)).Select
Selection.Font.Bold = True

MainSht.Activate

For i = 1 To ActiveSheet.Shapes.Count
MainSht.Shapes(i).Select
On Error Resume Next
ResultSht.Cells(i + 1, 1) = Selection.ShapeRange.Item(1).Name
ResultSht.Cells(i + 1, 2) =
Selection.ShapeRange.Item(1).Hyperlink.Address
Next i
ResultSht.Columns("A:B").EntireColumn.AutoFit
ResultSht.Cells(2, 1).Select
ResultSht.Activate
MsgBox "Done"
Else
Exit Sub
End If
End Sub


Private Function Find_Sht_Exists() As Boolean
For x = 1 To Sheets.Count
If Sheets(x).Name = "Link_" & MainSht.Name Then
MsgBox "A sheet with name " & Chr(34) & "Link_" & MainSht.Name &
_
" already exists. Delete that and try again"
Find_Sht_Exists = True
Exit Function
End If
Next x
Find_Sht_Exists = False
End Function


I hope this helps. Let me know.

- selva

for more info on vba code and other programming posts, visit
http://socko.wordpress.com
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
excel hyperlink to object pattic Excel Discussion (Misc queries) 3 March 3rd 09 06:46 PM
How to add a screen tip to an object (no a hyperlink)? Dudealt Excel Discussion (Misc queries) 1 August 8th 08 06:46 PM
Hyperlink to Embed Object brent Links and Linking in Excel 1 February 20th 07 04:02 PM
Set up a hyperlink to open a web object in excel? DT[_5_] Excel Programming 1 April 20th 06 06:26 PM
Remove hyperlink from a graphical object v_gyku Excel Programming 0 September 21st 05 10:24 AM


All times are GMT +1. The time now is 07:20 PM.

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"