David,
Other behaviour I've noted from testing.
From the note prior to this, I created a hyperlink the normal way.
I noticed that the Current Directory field did not change from the
Updated_Cemetery_Database to Brainerd_Images when I opened
the Brainerd_Images directory.
New results:
When creating the link, in the Create or Edit Hyperlink window, if
I back the current directory out to the disk drive level, then tunnel
down to the Brainerd_Images level, the current directory DOES change
to Brainerd_Images. However, I notice that the address field then
reads "Brainerd_Images/0217.jpg". I assume that is because the actual
relative address offset from the current directory of the open
spreadsheet is the one that the hyperlink needs to find the file. I
click on OK and the link does not work. Again, I notice that the
"Brainerd_Images" portion of the address is missing from the error
message, which reads "Cannot Open
"D:\Updated_Cemetery_Database\0217.jpg". Input/Output Error During
Processing!".
Well, if it is ignoring the subdirectory component during the parsing
of the address, of course it can't find the file!.
Lastly, if I manually enter the entire address into the address field
on the Edit/Create Hyperlink window, then click OK. The link works.
If I open the Edit Hyperlink function and close it without doing
anything, the link no longer works.
I really feel that the Create/Edit Hyperlink function has a bug on my
system. All of this worked OK in the past, as I have been adding
links to this database for almost 2 years.
I'm going to uninstall Excell and re-install it and see if the problem
goes away.
Paul
Hi Paul,
Reference to Absolute and Relative Hyperlinks
see replies by Harlan Grove
http://google.com/groups?threadm=uHCAPOp6BHA.1912@tkmsftngp03
and this one for access hyperlink property
http://google.com/groups?threadm=OjVRpQQ7BHA.2268@tkmsftngp04
Also I notice you have spaces in your directory names one of them was replaced by %20 which is a space.I'd suggest testing with
directories without spaces.Some browsers other than IE may not accept backslashes in which case you would have to use
file://d:/Updated%20Cemetary%Data/...
But that is probably not the problem I also tested my use of
HYPERLINK Worksheet Function by removing the hyphen in
my example so it was a space.
What do you see if you right click on the link and use edit hyperlink
You could specify the pathname in a cell on a specific sheet
and then use the HYPERLINK worksheet function
http://www.mvps.org/dmcritchie/excel/sheets.htm
What you are doing is similar to what people producing
catalogs might do.
c:/camera-canong3/25pct/ ( --- also worked with backslashes)
IMG_0028.JPG IMG_0028.JPG =HYPERLINK("file://" & $A$1 & A2,A2)
IMG_0029.JPG IMG_0029.JPG =HYPERLINK("file://" & $A$1 & A3,A3)
also worked without "file://" prefix
IMG_0030.JPG IMG_0030.JPG =HYPERLINK($A$1 & A4,A4)
You can get the pathname of the current workbook into cell A1 with your next directory
A1: =LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-1) & "\Brainerd Image\"
or with VBA: [a1] = Application.ActiveWorkbook.Path & "\Brainerd Image\"