Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.links
|
|||
|
|||
![]()
Because of problems with hyperlinks randomly changing without any
intervention a VBA procedure was written to perform various validation checks on the hyperlinks. One of the checks is to see if the link actually exist and if not report an error. Following is an excerpt of the VBA procedu For Each h in Worksheets(curwksname).Hyperlinks If (Dir(h.Address) = ) then Cells(errndx,1) = Invalid link to file: & h.Address errndx = errndx + 1 End If Next The Dir function return for every hyperlink thus, they are all reported as invalid. However, when selecting the hyperlink within the worksheet the link works fine. So, why does the Dir function not locate the file? Following is the value contained in h.Address: ...\..\..\dirnam1\dirnam2\dirnam3\dirnam4\dirnam5\ filename where dirnam is the levels of directories.. Following is the value displayed when I place the cursor over the hyperlink in the Excel spreadsheet: file:///\\NetworkId\Groups\..\..\..\dirnam1\dirnam2\dirnam 3\dirnam4\dirnam5\filename Thank you for your time. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
checking hyperlinks are valid | Excel Discussion (Misc queries) | |||
checking hyperlinks are valid | Excel Discussion (Misc queries) | |||
checking hyperlinks are valid | Excel Discussion (Misc queries) | |||
checking hyperlinks are valid | Excel Discussion (Misc queries) | |||
Why would hyperlinks in a spreadsheet change to an invalid path? | Excel Discussion (Misc queries) |