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

I have a spreadsheet that allows me to filter down to
specific groups of items in an inventory system. I used
the HYPERLINK function to create links to PDF drawings
(approx. 900) to confirm part selection. Creating
hyperlinks for each drawing would be much too time
consuming. The drawings are updated or changed once in a
while. Over time I have encountered broken links in the
spreadsheet. I need help verifying the existence of the
links. Does anyone know of a function, marco, or VBA code
that will verify the existence of the target file for each
hyperlink?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default hyperlink function verification

Assuming the Address of the hyperlink contains the fully qualified path to
the file then

for each lnk in Activesheet.hyperlinks
sAddr = lnk.Address
if dir(sAddr) = "" then
' not found, do what
else
' verified, do what
end if
Next
--
Regards,
Tom Ogilvy

"Mike Dickey" wrote in message
...
I have a spreadsheet that allows me to filter down to
specific groups of items in an inventory system. I used
the HYPERLINK function to create links to PDF drawings
(approx. 900) to confirm part selection. Creating
hyperlinks for each drawing would be much too time
consuming. The drawings are updated or changed once in a
while. Over time I have encountered broken links in the
spreadsheet. I need help verifying the existence of the
links. Does anyone know of a function, marco, or VBA code
that will verify the existence of the target file for each
hyperlink?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default hyperlink function verification

Thanks Tom,

I made a few changes to massage this into a function. It
does what I need.

Public Function CheckHyperlink(sAddr As String) As Boolean
If Dir(sAddr) = "" Then
CheckHyperlink = False
Else
CheckHyperlink = True
End If
End Function

I had to copy the link_location into another cell because
it was reading the entire cell contents as a string. Is
there some way to get just the link_location argument from
the HYPERLINK function without parsing in this case?

-----Original Message-----
Assuming the Address of the hyperlink contains the fully

qualified path to
the file then

for each lnk in Activesheet.hyperlinks
sAddr = lnk.Address
if dir(sAddr) = "" then
' not found, do what
else
' verified, do what
end if
Next
--
Regards,
Tom Ogilvy

"Mike Dickey" wrote

in message
...
I have a spreadsheet that allows me to filter down to
specific groups of items in an inventory system. I used
the HYPERLINK function to create links to PDF drawings
(approx. 900) to confirm part selection. Creating
hyperlinks for each drawing would be much too time
consuming. The drawings are updated or changed once in a
while. Over time I have encountered broken links in the
spreadsheet. I need help verifying the existence of the
links. Does anyone know of a function, marco, or VBA code
that will verify the existence of the target file for each
hyperlink?



.

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
Convert hyperlink function into hyperlink Pai Excel Worksheet Functions 4 November 10th 08 03:29 PM
Can't make hyperlink function work for hyperlink to website Frank B Denman Excel Worksheet Functions 15 February 5th 07 11:01 PM
Date verification Oldjay Excel Discussion (Misc queries) 4 October 24th 06 03:52 AM
How do I create a hyperlink to a cell with the hyperlink function S. Bevins Excel Worksheet Functions 2 July 20th 06 08:06 PM
Intra-workbook hyperlink: macro/function to return to hyperlink ce marika1981 Excel Discussion (Misc queries) 3 May 6th 05 05:47 AM


All times are GMT +1. The time now is 10:32 PM.

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

About Us

"It's about Microsoft Excel"