Consulting

Results 1 to 2 of 2

Thread: File Dialog in Xl 2004 on Mac?

  1. #1
    VBAX Expert
    Joined
    Aug 2007
    Location
    Windermere, FL, a 'burb in the greater Orlando metro area.
    Posts
    567
    Location

    File Dialog in Xl 2004 on Mac?

    On a windows machine I can use the following code to pop a file explorer dialog to select a folder.
    [VBA] If IsWindowsOS Then
    With Application.FileDialog(msoFileDialogFolderPicker)
    .AllowMultiSelect = False
    If .Show = -1 Then
    FilePath = .SelectedItems(1)
    ' MsgBox .SelectedItems(1)
    End If
    End With
    End If[/VBA]
    Can XL on Mac (2004) do something like this to open the file dialog to select a folder or a file? Since the commands File > Open pops such a dialog, is it too much to hope that there is a simple, efficient way to search for folders and/or files?

    Thanks!
    Ron
    Windermere, FL

  2. #2
    VBAX Mentor tpoynton's Avatar
    Joined
    Feb 2005
    Location
    Clinton, MA
    Posts
    399
    Location
    dont have a mac handy, but try Application.GetOpenFilename. could also try recording a macro opening a file to get some of the other parameters, and check VBA help on the function the recorder gives you!

Posting Permissions

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