Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error testing combobox to variable | Excel Programming | |||
Testing each cell for error | Excel Programming | |||
Testing for Hyperlink | Excel Programming | |||
Testing for error : was 2nd Occurence | New Users to Excel |