Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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
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
Finding files in a folder. Variable not defined error. Ayo Excel Discussion (Misc queries) 1 March 14th 08 01:14 PM
Path and Number of files in a folder. - Pass to Macro. Richard Excel Discussion (Misc queries) 1 December 21st 06 09:20 PM
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? Raven Excel Discussion (Misc queries) 1 January 24th 06 03:28 PM
finding all empty excel files in a folder. jackm1 Excel Discussion (Misc queries) 4 July 20th 05 11:23 PM
Program Files Folder Scott Gordon Excel Programming 0 May 5th 04 06:26 PM


All times are GMT +1. The time now is 04:03 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"