Proper syntax for GetOpenFileName

S

ShaneDevenshire

Hi Folks,

for opening text files the proper syntax for this command is
myName = Application.GetOpenFileName("TEXT")

If I want to do the same thing for Excel files the Help system seems to say
you should use:
myName = Application.GetOpenFileName("XLS4")

However, this causes an error. Can someone provide me with the correct
syntax.
 
J

JE McGimpsey

ShaneDevenshire said:
Hi Folks,

for opening text files the proper syntax for this command is
myName = Application.GetOpenFileName("TEXT")

If I want to do the same thing for Excel files the Help system seems to say
you should use:
myName = Application.GetOpenFileName("XLS4")

However, this causes an error. Can someone provide me with the correct
syntax.

Standard XL97/98->XL2003/2004 file type is XLS8.

myName = Application.GetOpenFilename("XLS8")
 
S

ShaneDevenshire

Hi,

Well, you know I tried everything from XLS4 to XLS11 and none worked, but
after your post I thought - maybe this is because the files are PC versions.
So I opened one of the files and saved it right back. And everything worked
just fine!
 

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