Consulting

Results 1 to 4 of 4

Thread: MS Project Application.FileDialog

  1. #1

    MS Project Application.FileDialog

    I am attempting to use the application.filedialog object to allow a user to select a folder. I do this quite often in other Office application VBA projects.

    Unfortunately it appears that winproj's application object doesn't support the filedialog method (despite the help files containing the same examples from other office apps).

    Does anyone know of a way to prompt the user with the filedialog object to browse for a folder in MSP? If not (ie it's not possible) are there any clever work arounds?

    I'm using MSP Pro 2007 sp2 on Windows 7.

    Thanks.

  2. #2
    Solved. I have to use the windows api. I found this helpful...

    ... or not. I do not have enough posts to include a link. So for anyone who finds this and needs the same answer, go research SHBrowseForFolderA.

  3. #3
    VBAX Regular Chabu's Avatar
    Joined
    Dec 2010
    Location
    Brussels
    Posts
    85
    Location
    If you have a reference to the Office library (its there by default) you should be able to do the following
    [VBA]
    Dim fd As FileDialog
    Set fd = Application.FileDialog(msoFileDialogFolderPicker)
    [/VBA]

  4. #4

    Thank you

    Thank you for problem and the solution

Posting Permissions

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