Hi All.
Does anyone know if msoFileDialogFolderPicker can be used on a Mac?
I appreciate any suggestions on this subject.
Thanks for helping.
mauryb
Hi All.
Does anyone know if msoFileDialogFolderPicker can be used on a Mac?
I appreciate any suggestions on this subject.
Thanks for helping.
mauryb
I'd use this
[VBA]Dim returnVal As String
returnVal = MacScript("try" & vbLf & "choose folder" & vbLf & "end try")
If returnVal = Chr(0) Then
MsgBox "cancel pressed"
Else
MsgBox "folder chosen: " & vbCr & returnVal
End If[/VBA]
mikerickson,
Thank you once again.
I could not get the macscript to work. No surprise there.
You may recall I am writing for a Mac on a Pc.
Your suggestion was still helpful because it did prompt me to look a little more into scripting. I may have been "missing the boat" on this resource.
Less elegant, what I ended up doing was using the Dir() function to create a list box of folders to pick from in a form.
Your time and expertise is really appreciated--especially for the tip on Application.PathSeparator. This was a life saver.
Best,
mauryb
Have you tried conditional compiling.
[VBA]Sub test()
Dim returnVal As String
#If Mac Then
returnVal = MacScript("try" & vbLf & "choose folder" & vbLf & "end try")
If returnVal = Chr(0) Then returnVal = "False"
#Else
Rem code for Windows
#End If
If returnVal = "False" Then
MsgBox "cancel pressed"
Else
MsgBox "folder chosen: " & vbCr & vbCr & returnVal
End If
End Sub[/VBA]