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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.GetOpenFilename

Status
Not open for further replies.

maccten2000

Programmer
May 13, 2003
37
EU
Hi All

I am trying to get a prompt in MS Access that prompts the user to select an excel file in a particular directory and import it into an access table.

I have been messing around with the code below and have one issue and one question

Code:
' Declare Variables
  Dim Filename As Variant
' Open Dialogue
  Filename = Application.GetOpenFilename(FileFilter:="Excel Files (*.xls*), *.xls*", Title:="Choose Files", MultiSelect:=False)

Firstly when it compiles i am told that ".GetOpenFilename: Method or data member not found"
Am i missing a reference library?

Secondly the question. Is there anyway i can use this statement and specify the starting directory to find the file in

Thank you all very much for your help
John
 
Application.GetOpenFilename
Application should be an Excel.Application object.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top