Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / January 2005

Tip: Looking for answers? Try searching our database.

Help with FileDialog Access 2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Terry Olsen - 06 Jan 2005 03:34 GMT
I'm trying to open a Browse for file dialog box.  But I get errors:

1. Dim statement gives me a "Type Mismatch" error.
2. When I remove the Dim statement, the Set statement give me a "method
failure" error.

Can anyone help?  Thanks.

Public Function BrowseForExe() As String
Dim dlgOpen As Application.FileDialog
Set dlgOpen = Application.FileDialog(msoFileDialogFilePicker)

With dlgOpen
   .AllowMultiSelect = False
   .Show
   BrowseForExe = dlgOpen.Path
End With

End Function
Herbert Chan - 06 Jan 2005 11:23 GMT
I'm not sure, how about dim it as an object only, i.e.,

Dim dlgOpen As Object

Herbert

> I'm trying to open a Browse for file dialog box.  But I get errors:
>
[quoted text clipped - 15 lines]
>
> End Function
Douglas J. Steele - 06 Jan 2005 21:35 GMT
Far better to use the API approach outlined in
http://www.mvps.org/access/api/api0002.htm at "The Access Web"

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> I'm trying to open a Browse for file dialog box.  But I get errors:
>
[quoted text clipped - 15 lines]
>
> End Function
Terry Olsen - 07 Jan 2005 01:50 GMT
Hey, that worked great.  Thanks!

> Far better to use the API approach outlined in
> http://www.mvps.org/access/api/api0002.htm at "The Access Web"
[quoted text clipped - 18 lines]
>>
>> End Function
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.