Access 2007 / VBA: .InitialFileName

sensetech

An old, bold coder
Local time
Today, 09:20
Joined
May 1, 2009
Messages
41
I'm using Application.FileDialog(msoFileDialogFilePicker) to enable the user to select an Excel file for processing. It correctly obeys .Filters to restrict the files shown to .xls and .xlsx and if I specify just a folder name terminated by "\" in .InitialFileName that works as required too. So far so good!

If however I extend .InitialFileName to comprise a folder name followed by "\" and a filename (or a filename pattern e.g. *template*) it seems to ignore the filename part and still shows all the Excel files in the specified folder.

I've Googled this and can't find anyone else having the same problem. Anyone here got any clues as to what I'm missing / doing wrong?

(PS I'm 99% sure this used to work fine in Access 2003)
 

Users who are viewing this thread

Back
Top Bottom