Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Question Testing for hyperlink error

I have an artifact database with a bit over 4000 entries, and I'm using the hyperlink function to 'attach' a jpg photo to each artifact. The problem is that not all artifacts have a photo, and I wish to be able to use a column to indicate which links are valid, and which yet need a photo.
How do I test for a lack of photo, using hyperlink? I do get a message informing me of the missing photo, but I hope not to have to go through the database one artifact at a time...
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Testing for hyperlink error

Hi James,

Am Sun, 7 Jul 2013 06:56:11 +0100 schrieb James W. Johnson:

I have an artifact database with a bit over 4000 entries, and I'm using
the hyperlink function to 'attach' a jpg photo to each artifact. The
problem is that not all artifacts have a photo, and I wish to be able to
use a column to indicate which links are valid, and which yet need a
photo.
How do I test for a lack of photo, using hyperlink? I do get a message
informing me of the missing photo, but I hope not to have to go through
the database one artifact at a time...


your hyperlinks in column A.
Put following function in a standard module and call the function into
the sheet with:
=picExists(A1)

Function picExists(myCell As Range) As Boolean
Dim strFile As String

strFile = Replace(myCell.Hyperlinks(1).Address, "File///", "")
picExists = IIf(Dir(strFile) < "", True, False)
End Function

Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
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
Error testing combobox to variable [email protected] Excel Programming 5 November 15th 07 05:14 PM
Testing each cell for error [email protected] Excel Programming 2 June 14th 07 04:16 PM
Testing for Hyperlink JJ \(UK\)[_4_] Excel Programming 8 August 19th 05 06:02 PM
Testing for error : was 2nd Occurence Rodney New Users to Excel 5 April 29th 05 02:59 AM


All times are GMT +1. The time now is 03:58 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"