![]() |
Opening a .exe file from an excel hyperlink
i've a problem.
I have to distribute an excel file containing an hyperlink to a external program that is supposed to be in users' PC. the problem is i don't know where this file is saved inside other users HD then i can't create a universal hyperlink to open it directly from the excel file. this external program have its own installation folder and its .exe icon but, i can not know in which disk is located. so how can i create a universal hyperlink able to open this .exe file from its real path??? thx ! |
Opening a .exe file from an excel hyperlink
The only solution I could think of is if the user created a link to it on
their desktop with a common name, you could hyperlink to the desktop link. Or (and that doesn't sound practical), have code search their drives to find the file, then create the hyperlink. You could do that in some form of installation program. -- Regards, Tom Ogilvy "furbiuzzu" wrote in message oups.com... i've a problem. I have to distribute an excel file containing an hyperlink to a external program that is supposed to be in users' PC. the problem is i don't know where this file is saved inside other users HD then i can't create a universal hyperlink to open it directly from the excel file. this external program have its own installation folder and its .exe icon but, i can not know in which disk is located. so how can i create a universal hyperlink able to open this .exe file from its real path??? thx ! |
Opening a .exe file from an excel hyperlink
tanks for your answer.
i've tried many solution but the best one i found is to leave unprotected the "hyperlink" cell so that users can create "their own path" inside their disk. Another question... Does a "universal" path to ProgramFiles Folder exist ?? something like %ProgramFiles% i mean... (i've tried it but doesn't work) I know that the program i've to launch has an instalaltion directory that it's supposed to be: C:\\ProgramFiles (or Programmi for italian users) \ JEAHPE \JEAHPE.exe but if the directory it's in another disk ( G: ; F: ; Z:???) how can i solve this problem ?? thx again ! |
Opening a .exe file from an excel hyperlink
Take a look he
http://support.microsoft.com/default...b;en-us;191198 SAMPLE: SFOLDER.EXE Gets the Path of a Special Folder -- Regards, Tom Ogilvy "furbiuzzu" wrote in message ups.com... tanks for your answer. i've tried many solution but the best one i found is to leave unprotected the "hyperlink" cell so that users can create "their own path" inside their disk. Another question... Does a "universal" path to ProgramFiles Folder exist ?? something like %ProgramFiles% i mean... (i've tried it but doesn't work) I know that the program i've to launch has an instalaltion directory that it's supposed to be: C:\\ProgramFiles (or Programmi for italian users) \ JEAHPE \JEAHPE.exe but if the directory it's in another disk ( G: ; F: ; Z:???) how can i solve this problem ?? thx again ! |
Opening a .exe file from an excel hyperlink
thx.... i'll take a look but it seems too complicated for a newbie like
me..... |
Opening a .exe file from an excel hyperlink
MsgBox Environ("ProgramFiles")
-- Jim "furbiuzzu" wrote in message ups.com... | tanks for your answer. | | i've tried many solution but the best one i found is to leave | unprotected the "hyperlink" cell so that users can create "their own | path" inside their disk. | | Another question... | | Does a "universal" path to ProgramFiles Folder exist ?? | | something like %ProgramFiles% i mean... | (i've tried it but doesn't work) | | I know that the program i've to launch has an instalaltion directory | that it's supposed to be: | | C:\\ProgramFiles (or Programmi for italian users) \ JEAHPE \JEAHPE.exe | | but if the directory it's in another disk ( G: ; F: ; Z:???) how can i | solve this problem ?? | | thx again ! | |
Opening a .exe file from an excel hyperlink
you're a genius!
now, how can i copy automatically to my hyperlink the messagebox result??? |
Opening a .exe file from an excel hyperlink
Done !!!!!
thank you so much !!!!! that's the result Sub jeahpe2() ' ' jeahpe2 Macro ' Macro registrata il 08/11/2005 da fulvio ' Dim programfile As String Range("A31").Select programfile = Environ("ProgramFiles") ActiveSheet.Hyperlinks.Add Anchor:=selection, Address:= _ programfile & "\JEAHPE\JEAHPE.exe", TextToDisplay:= _ "JEAHPE.exe" Range("A31").Select selection.Hyperlinks(1).Follow NewWindow:=True, AddHistory:=True End Sub |
Opening a .exe file from an excel hyperlink
I doubt this is an issue for you, but just for information, the environ
variable for ProgramFiles is not predefined in Windows 9X (at least it isn't in xl 98 SE). to illustrate from the immediate window: programfile = Environ("ProgramFiles") ? "=" & programFile & "<=" =<= -- Regards, Tom Ogilvy "furbiuzzu" wrote in message ups.com... Done !!!!! thank you so much !!!!! that's the result Sub jeahpe2() ' ' jeahpe2 Macro ' Macro registrata il 08/11/2005 da fulvio ' Dim programfile As String Range("A31").Select programfile = Environ("ProgramFiles") ActiveSheet.Hyperlinks.Add Anchor:=selection, Address:= _ programfile & "\JEAHPE\JEAHPE.exe", TextToDisplay:= _ "JEAHPE.exe" Range("A31").Select selection.Hyperlinks(1).Follow NewWindow:=True, AddHistory:=True End Sub |
All times are GMT +1. The time now is 10:39 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com