+ Reply to Thread
Results 1 to 3 of 3

Finding the Path to the Program Files Folder

  1. #1
    Registered User
    Join Date
    12-04-2005
    Posts
    3

    Finding the Path to the Program Files Folder

    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

  2. #2
    Norman Jones
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    >
    > 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. #3
    keepITcool
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1