Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Find Excel path

Hello,

could anyone tell me how to find the exact path of the Excel application in
the registry, independent of the Office version installed on the PC?

Thx,

Lieven



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Find Excel path

I suspect I may be being a "spoilt corporate" gere (only
having work with fairly recent vwersions) - so I dont know
when:

Application.Path

was implemented.



ttfn benm
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Find Excel path

Lieven,

Bit confused on the question.

The registry will only reflect versions of Excel that have been installed.
It may have old data there, but it won't have anything about versions that
have not been installed.

Can you be more specific?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Lieven Mettepenningen" wrote in message
...
Hello,

could anyone tell me how to find the exact path of the Excel application

in
the registry, independent of the Office version installed on the PC?

Thx,

Lieven





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Find Excel path

I know it is available in xl97 and later and suspect it has been available
since xl5.

--
Regards,
Tom Ogilvy

"Ben McBen" wrote in message
...
I suspect I may be being a "spoilt corporate" gere (only
having work with fairly recent vwersions) - so I dont know
when:

Application.Path

was implemented.



ttfn benm



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Find Excel path

Confirmed. Runs fine in Excel 5.

Best wishes Harald

"Tom Ogilvy" skrev i melding
...
I know it is available in xl97 and later and suspect it has been available
since xl5.

--
Regards,
Tom Ogilvy

"Ben McBen" wrote in message
...
I suspect I may be being a "spoilt corporate" gere (only
having work with fairly recent vwersions) - so I dont know
when:

Application.Path

was implemented.



ttfn benm







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Find Excel path

If you're not running this from excel, something like this will give you the
default program associated with .xls files.

Option Explicit
Public Declare Function FindExecutable Lib "shell32.dll" _
Alias "FindExecutableA" ( _
ByVal lpFile As String, _
ByVal lpDirectory As String, _
ByVal lpResult As String) As Long

Sub FindXLSprogram()
Dim FName As String
Dim ExeName As String
Dim Pos As Integer
Dim Path As String
Dim FileNumber As Long

ExeName = String(255, 0)
FName = Environ("temp") & "\someuniquenamegoeshere.xls"

FileNumber = FreeFile
On Error Resume Next
Kill FName
On Error GoTo 0

Open FName For Append As FileNumber
Close FileNumber

FindExecutable FName, "", ExeName

On Error Resume Next
Kill FName
On Error GoTo 0

Pos = InStrRev(ExeName, "\")
Path = Left(ExeName, Pos - 1)

Debug.Print "Full File Name: " & ExeName
Debug.Print "Folder Name: " & Path

End Sub


(Lots of this was stolen from a post by Chip Pearson.)


Lieven Mettepenningen wrote:

Hello,

could anyone tell me how to find the exact path of the Excel application in
the registry, independent of the Office version installed on the PC?

Thx,

Lieven


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing violation on Excel files and cannot find the path specifie Will Excel Discussion (Misc queries) 0 December 7th 09 01:21 PM
hyperlink navigation path path wrong in Excel 2003 CE Admin Excel Discussion (Misc queries) 5 January 7th 06 07:47 PM
find and replace path name in Excel cells containing hyperlink leoe Excel Discussion (Misc queries) 1 August 9th 05 08:57 PM
find a path rbekka33[_16_] Excel Programming 0 September 21st 04 11:56 PM
How to find the path where a .XLA is located Belinda Excel Programming 2 March 2nd 04 06:37 AM


All times are GMT +1. The time now is 12:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"