Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2002
    Posts
    154

    Question Unanswered: Center File Open Save Dialog API

    By scouring the net, I have synthesized a number of items into a class that allows me to easily open the File Open API Dialog and then store the path for the file chosen. I also found a way to center that dialog rather than open it in the upper left hand corner using a callback function, but it does not work in Access 2003 vba. It uses a dummy function named FarProc that accepts the AddressOf the callback function, OFNHookProc, but do to Errors telling me that this is an inappropriate use of AddressOf, I have come to the conclusion that you can only send AddressOf with API functions and not user-created functions. Despite this bit of rambling, I am wondering if anyone knows an easy way to get the handle of the File/Open Dialog; if I could get that handle, I could just use the MoveWindow Library function to center it. I thank you all in advance for your time and your replies.

  2. #2
    Join Date
    Nov 2002
    Posts
    154
    NM. I have decided to try out the Office.FileDialog object instead. Although several expert sites seemed to warn against it, its programming and functionality are much easier and richer than the only programming approach using GetOpenFileName, especially since I have no Access version issues to contend with. If I have problems with it I'll most likely post it in this forum.

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I use the File/Open dialog using the example code in the code bank and have never had problems with it regardless of Access version.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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