Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Convert hyperlink function into hyperlink | Excel Worksheet Functions | |||
Can't make hyperlink function work for hyperlink to website | Excel Worksheet Functions | |||
Date verification | Excel Discussion (Misc queries) | |||
How do I create a hyperlink to a cell with the hyperlink function | Excel Worksheet Functions | |||
Intra-workbook hyperlink: macro/function to return to hyperlink ce | Excel Discussion (Misc queries) |