In article ,
apps RemoveThis @moroch.com (Alex Archambault) wrote:
> I have an Excel spreadsheet with lots of VBA code that lives in both
> Mac/Windows environments very well.
>
> What I want/need is a way to open a "Save As" style window that
> will work in both Mac/Windows.
>
> Any suggestions?
The GetSaveAsFilename() works on both Mac and Windows, but the optional
FileFilter argument has different sytaces.
To use the FileFilter argument, you can use conditional compilation:
Dim vFileName As Variant
Do
#If Mac Then
vFileName = Application.GetSaveAsFilename( _
fileFilter:="TEXT")
#Else
vFileName = Application.GetSaveAsFilename( _
fileFilter:="Text Files (*.txt), *.txt")
#End If
If vFileName = False Then Exit Sub 'User cancelled
Loop Until vFileName <> ""
MsgBox vFileName
>> Stay informed about: Save/Open window