Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.links
external usenet poster
 
Posts: 1,814
Default Valid Hyperlinks being reported as Invalid

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
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
checking hyperlinks are valid Rafael Guerreiro Osorio Excel Discussion (Misc queries) 2 April 4th 23 12:57 PM
checking hyperlinks are valid Garbagh Excel Discussion (Misc queries) 2 September 21st 17 05:04 PM
checking hyperlinks are valid Garbagh Excel Discussion (Misc queries) 0 November 30th 06 03:16 PM
checking hyperlinks are valid Rafael Guerreiro Osorio Excel Discussion (Misc queries) 0 November 30th 06 02:34 PM
Why would hyperlinks in a spreadsheet change to an invalid path? LisaW Excel Discussion (Misc queries) 1 September 19th 06 05:38 PM


All times are GMT +1. The time now is 09:24 AM.

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"