Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 ! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 ! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 ! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 ! |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thx.... i'll take a look but it seems too complicated for a newbie like
me..... |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 ! | |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you're a genius!
now, how can i copy automatically to my hyperlink the messagebox result??? |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
opening a file with a hyperlink | Excel Discussion (Misc queries) | |||
Pdf hyperlink not opening in excel worksheet - nothing appears. | Excel Worksheet Functions | |||
hyperlink is opening file with wrong program | Excel Discussion (Misc queries) | |||
Hyperlink 4 Opening More Than 1 File. | Excel Discussion (Misc queries) | |||
Problem opening hyperlink to PDF file in Excel 2003 | New Users to Excel |