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

Fil Dialog help 1

Status
Not open for further replies.

billheath

Technical User
Mar 17, 2000
299
US
I am trying to use code copied from the Northwind database to select a file.
The code is:
Dim fileName As String
Dim result As Integer
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Select Picture"
.Filters.Add "All Files", "*.*"
.Filters.Add "JPEGs", "*.jpg"
.Filters.Add "Bitmaps", "*.bmp"
.FilterIndex = 3
.AllowMultiSelect = False
.InitialFileName = CurrentProject.path
result = .Show
................
When I try to run it, I get the message, "Methed - 'File Dialog' of object'_Application Failed". I am using access 2003. One of the threads (thread705-1099796) suggested adding a reference to "Microsoft Office x.01". I can't find that in the reference list. Any help would be greatly appreciated.
Thanks, Bill
 
Your code worked on my system. The reference listing is for office 10, but yours might be a higher number

"Microsoft Office 10.0 Object Library".

You also can browse, again your office might be a higher number and located on a different volume.

C:\Program Files\Common Files\Microsoft Shared\Office10\MSO.DLL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top