Returning multiple files from the File Open Dialog API?

The above question was asked in the newsgroups - File Dialog Using API.  Tom Wickerath, fellow MVP, found the answer in another newsgroup posting Get External Data.   

Note that Doug Steele, fellow MVP, commented "When using multiselect, what's returned is the folder name, followed by a Null character, followed by the name of the first file, followed by a Null character and so on until the last file name, which is followed by two Null characters."   (In VBA the Null character is the constant vbNull.)

The simple single file API solution is found at the Access Web page Call the standard Windows File Open/Save dialog box.

Added: An alternate solution can be found at the following page GetOpenFileName: File Open Common Dialog Basics.  This solution requires that you pass in the OFN_ALLOWMULTISELECTflag.  Which is shown in the Command1_Click() subroutine.

Published Thursday, December 27, 2007 5:45 PM by Tony
Filed under: , ,

Leave a Comment

(required) 
(required) 
(optional)
(required)