Application.GetOpenFilename ???

G

Guest

Hi

I'm trying to do the followign in access as opposed to excel

fileToOpen = Application
.GetOpenFilename("Text Files (*.txt), *.txt"
If fileToOpen <> False The
MsgBox "Open " & fileToOpe
End I

How can I rewrite this so the user can select the file to be uploaded

Thanks
Marcus
 
L

Larry Linson

In any 32-bit version of Access (that is, from Access 95 onward), you can
use the Windows Common Dialog directly, using the information and code
you'll find at http://www.mvps.org/access/api/api0001.htm. This code was
contributed by Ken Getz, one of the authors of the Access Developer's
Handbook series.

Larry Linson
Microsoft Access MVP
 
G

Guest

Thanks Larry

Do i need to turn on 'Common Dialog Control ' as a reference or somethign... if so, where do i find it and what is its name

I seem to get an error when i try and run the macro
"Only comments may appear after End Sub, End Function or End Property

I have copied and pasted the text in the shaded area exactly from the web site link

I'm using Windows XP and Access 2000

Any suggestions

Marcus
 

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