Open file dialog box works in XL2000 but not in XL2003

C

Cydonio

Hi all,
I have this code working fine in an Excell 2000 macro:

Sheets("SF.LMI.LOAN.DTL").Activate
filePath = Application.GetOpenFilename("Load LOAN detail Files
(*.LOAN.DTL), *.LOAN.DTL", , "Select a Loan Detail file")
If filePath = False Then
Exit Sub
End If

The code shows the Open File dialog box, displaying only the name of the one
particular file I want to show to the user. However, it does not work in
XL2003. When the box is displayed XL2003, the list of files is empty. So, I
have to change the pattern for the file name to *.*, which displays all the
files in the directory.
Does anyone know why it does not work the same in XL2003?

Thanks in advance
 
D

Dave Peterson

Maybe you could use a pattern of *.DTL

It worked ok for me in xl2003 and winXP home.

(I'm not sure if it's an excel difference or a windows difference.)
 
C

Cydonio

I already tried *.DTL but got the same thing, an empty list. I tried all
kinds of patterns but none of them work. I think it might have something to
do with the actual file names containing more than one dot in them. That
situation also prevents me from reading the files using ADO. By the way, I
cannot change the naming standard of the files.
 
D

Dave Peterson

It worked ok for me in xl2003 and winXP home.

What version of Windows are you using? Maybe someone using the same version of
windows could try it.
 

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