View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Finding the Path to the Program Files Folder

Hi JGS,

Try:

'=============
Public Sub TesterX()
Dim Wsh As Object
Dim sPath As String

Set Wsh = CreateObject("WScript.Shell")
sPath = Wsh.SpecialFolders("Programs")

MsgBox sPath

End Sub
'<<=============

---
Regards,
Norman



"JGS" wrote in message
...

Hi All

How do you find the relative path to the Program Files folder on a
particular computer so that a declare statement can find a function
within a dynamic-link library?

Declare Function SOMEFUNCTION Lib "c:\Program Files\SomeDLL.dll" (ByVal
SomeNo As Double) As Double

Any suggestions would be much appreciated.

Regards

Jeremy


--
JGS
------------------------------------------------------------------------
JGS's Profile:
http://www.excelforum.com/member.php...o&userid=29337
View this thread: http://www.excelforum.com/showthread...hreadid=492652