Get user-picked list of file names on Mac?

R

robotman

I'm developing a cross-platform macro that needs to open several files
at once.

In Windows, I can use GetOpenFileName with the multi-select option to
get a list of chosen files in a single dialog:

ChosenFiles = Application.GetOpenFilename("XLS Files (*.xls),
*.xls", 1, "Please select XLS data files to import", , True)

On the Mac, I don't seem to be able to pass any of the parameters.
Can Macs even do multi-select?

ChosenFiles = Application.GetOpenFilename("")

Thanks!

John
 
J

JE McGimpsey

Take a look at the GetOpenFilename() method topic in Mac XL/VBA Help -
the filefilter syntax is different.

And yes, a bug in MacXL prevents Multiple file selections. In my
applications, I have conditionally compiled a userform for multiselects
on the Mac.
 
R

robotman

Thanks for the reply, John.

I saw that the filter syntax is "TEXT" instead of ".txt", but the Help
doesn't list what are other acceptable Mac filters (i.e. "EXCEL",
"OFFICE"?). Also, can you pass any other parameters to the
GetOpenFileName() method on the Mac? The help file is a bit lean with
Mac info!

I can't use a conditionally-compiled user form because the user needs
to browse for the folder and then select the files. For now, I'm
conditionally having the macro ask the user to choose files one-by-one
on the Mac which is a bit tedious.

Hmmm... let me know if you can think of anything else. Maybe have the
user pick the folder and then pop-up the conditionally-compiled form?

Thanks!

John
 

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