Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open File window 1

Status
Not open for further replies.

spruceni

Technical User
May 18, 2007
72
GB
Hi I have done a search for this but I am not sure of the correct keywords.

I have a routine which processes EXCEL files and imports them into the database. However I want to move away from forcing the user to load the EXCEL file in a certain fixed Directory. The window you get when clicking on Open in WORD is ideal. The user can navigate to the directory and select the file and then open it.

Is there an equivalent routine in VB Access which would call a similar window so that the user could navigate to input EXCEL sheet and I can then lift the path and name so that I can import it into the database.

 
Thanks for replying

But to show my basic level of VB.
I assume cmdlgOpenFile is some form of function or collection. Where would I find information on it. VB Help is no use. Also what would the declaration statements be?

I have used "Set Fs = Application.FileSearch" in another part of the code but that is used to search for files if you know the location of them.



Thanks

 
Hi again

I created a new module and named it "clsCommonDialog". Now does that make it a class module; or is there some way of setting the properties of a module to turn it into a class module?

Anyway when I try to compile I get the error on

Dim cmdlgOpenFile As New clsCommonDialog

"A module is not a valid type"

The calling routine is in a different module.

As you should have worked out by now this is a totally new subject for me.


Thanks

 
Its OK I did more research

Thanks for help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top