Why does hyperlink fail?

November 25th, 2011 - 09:05 am ET by Terry Pinnell | Report spam
Using Excel 2000 (under Windows XP) I cannot get a hyperlink of the form
ProgramXYZ.exe FileToOpen.ext
to work. It fails with the rather unhelpful message "An unexpected error
has occurred."

I've tried several simple examples, such as:
notepad.exe C:\Test.txt
or
C:\windows notepad.exe C:\Test.txt
but all fail. They work fine as normal shortcuts or in the Run box.

Anyone have any insights into this please? Or how to work around it?

Terry, East Grinstead, UK
email Follow the discussionReplies 4 repliesReplies Make a reply

Replies

#1 James Ravenswood
November 26th, 2011 - 03:05 pm ET | Report spam
On Nov 25, 9:05 am, Terry Pinnell wrote:
Using Excel 2000 (under Windows XP) I cannot get a hyperlink of the form
ProgramXYZ.exe FileToOpen.ext
to work. It fails with the rather unhelpful message "An unexpected error
has occurred."

I've tried several simple examples, such as:
notepad.exe C:\Test.txt
or
C:\windows notepad.exe C:\Test.txt
but all fail. They work fine as normal shortcuts or in the Run box.

Anyone have any insights into this please? Or how to work around it?

Terry, East Grinstead, UK



Sub Macro1()
x = Shell("cmd.exe /c C:\temp\x.txt", 1)
End Sub

this works assuming the default app for .txt is NotePad

Similar topics