Save/Open window

  • Thread starter Alex Archambault
  • Start date
A

Alex Archambault

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?

Thanks
 
J

JE McGimpsey

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top