PDA

View Full Version : File Dialog in Xl 2004 on Mac?



RonMcK
08-11-2008, 06:56 AM
On a windows machine I can use the following code to pop a file explorer dialog to select a folder.
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
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!

tpoynton
08-13-2008, 06:58 PM
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!