×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

GetOpenFilename - Excel 97 and Excel XP

GetOpenFilename - Excel 97 and Excel XP

GetOpenFilename - Excel 97 and Excel XP

(OP)
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)?

RE: GetOpenFilename - Excel 97 and Excel XP

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources