Hyperlink

  • Thread starter Thread starter engmgriff
  • Start date Start date
E

engmgriff

Hi

I dont know if you can do this but anyone with any ideas would b
greatful. I would like to set up a hyperlink which calls for a drawin
from a cd which also holds the excel sheet with the hyperlink on.
However this cd will be used by other uses. The problem will occu
when their CD drive has a different letter designating it. Therefor
the hyperlink will not work. Is there anyway around this.

Thanks in advance

Mat
 
I try to not open files from removeable media (like floppy/cd/zip drives), but
you could try something like:

=HYPERLINK(LEFT(CELL("filename",A1),1)&"\myfolder\mypicture.jpg")

=cell("filename",a1)
will return the name of the workbook (if it's been saved). Taking the left most
character will give me the drive letter.

And I've never used this, but you may want to look at:
file|properties
There's a "Hyperlink Base" option there (at least in xl2002).

From xl2002's help:

Set the base address for the hyperlinks in a workbook
By default, unspecified paths to hyperlink destination files are relative to the
location of the active workbook. Use this procedure when you want to set a
different default path. Each time you create a hyperlink to a file in that
location, you'll only have to specify the file name, not the path, in the Insert
Hyperlink dialog box.

On the File menu, click Properties.
Click the Summary tab.
In the Hyperlink base box, type the path you want to use.
Note You can override the hyperlink base address by using the full, or
absolute, address for the hyperlink in the Insert Hyperlink dialog box.

===
If your version uses it (I'm not sure when it was added--it might be available
for all versions????), you could have a little macro that sets it when you open
the workbook:

Option Explicit
Sub auto_open()
With ThisWorkbook
.BuiltinDocumentProperties("Hyperlink base") _
= Left(ThisWorkbook.Path, 3)
End With
End Sub

(or whatever path you need.)
 
Back
Top