Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetOpenFilename - Excel 97 and Excel XP

Status
Not open for further replies.

yybd

Mechanical
Joined
Apr 15, 2003
Messages
1
Location
US
I have written a large amount of code in Excel 97 VBA that uses the Application.GetOpenFilename command. In 97, I was able to select the files to open in a specific order. In other words, the filenames in the array would be in the order that they were selected in the dialog box.

I have just upgraded to Excel XP and this is no longer the case! No matter what order the files are selected in the dialog box, the array is created in ALPHABETICAL order!

This is bad... very bad - it has pretty much rendered my program useless.

Anyone know of a fix to this (without going back to Excel 97)?
 
I don't know of a fix for this, I use a workaround by calling GetOpenFile for a single file select within a DO construct. I add the filename to an array each time the user presses OPEN, and continue the DO until the user presses cancel.

This is okay for a small number of files, not great if you want to select heaps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top