Hyperlink Excel2000 vs Excel2002
Have you tried creating the hyperlink by inserting a "=HYPERLINK(...)"
formula into the cell ?
sURL = "\\S10AC52B\Eng\SCN\" & SCNFile
sText = SCNNumber
selection.formula = "=HYPERLINK(" & sURL & "," & sText & ")"
Tim.
"Darrell Wesley" wrote in message
...
The following code is used in an Excel Macro and when ran in Excel2000
creates a valid hyperlink but in Excel2002 it does not.
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"\\S10AC52B\Eng\SCN\" & SCNFile, TextToDisplay:= _
"" & SCNNumber
When SCNFile is set equal to "3PH-04011.xls" the hyperlink url that's
created in Excel2000 looks like " \\S10AC52B\Eng\SCN\3PH-04011.xls" but
when
created in Excel2002 it looks like "..\..\Eng\SCN\3PH-04011.xls"
Anyone have an idea as to why excel would change the url? How can I make
it
work correctly?
|