![]() |
Finding the Path to the Program Files Folder
Hi All How do you find the relative path to the Program Files folder on particular computer so that a declare statement can find a functio within a dynamic-link library? Declare Function SOMEFUNCTION Lib "c:\Program Files\SomeDLL.dll" (ByVa SomeNo As Double) As Double Any suggestions would be much appreciated. Regards Jerem -- JG ----------------------------------------------------------------------- JGS's Profile: http://www.excelforum.com/member.php...fo&userid=2933 View this thread: http://www.excelforum.com/showthread.php?threadid=49265 |
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 |
Finding the Path to the Program Files Folder
JGS,
if the DLL is properly registered with regsvr imo you dont need to specify a path. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam JGS wrote : 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 |
All times are GMT +1. The time now is 01:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com