Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding files in a folder. Variable not defined error. | Excel Discussion (Misc queries) | |||
Path and Number of files in a folder. - Pass to Macro. | Excel Discussion (Misc queries) | |||
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? | Excel Discussion (Misc queries) | |||
finding all empty excel files in a folder. | Excel Discussion (Misc queries) | |||
Program Files Folder | Excel Programming |