WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Valid Hyperlinks being reported as Invalid

 
   Home -> Office -> Links RSS
Next:  Showing hyperlink when using lookup  
Author Message
Steve

External


Since: Apr 20, 2006
Posts: 784



(Msg. 1) Posted: Mon Dec 22, 2008 8:45 pm
Post subject: Valid Hyperlinks being reported as Invalid
Archived from groups: microsoft>public>excel>links (more info?)

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 procedure:

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\dirnam3\dirnam4\dirnam5\filename

Thank you for your time.
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Links All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support