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

FileDialog Box

Status
Not open for further replies.

JimmyBlogs

Programmer
Jul 10, 2006
5
GB
Hi.

I've used this before but at another job. I cannot find the reference library that allows me to reference the Filedialog method. I have loaded reference library "microsoft office 11.0 object library" which allows me to decalre a variable as FileDialog. But in the code

'My code
Set DlgOpen = Application.

'From here i do not get the option of FileDialog being available.


'How it should work is below
Set DlgOpen = Application.FileDialog(msoFileDialogFilePicker)

I am not sure if i am missing something here to get my FileDialog method working, or my Access libraries in this new job are buggered.

Anyone have any thoughts ???

 
Well the FileDialog object is a member of Office, so you are correct in setting a reference to the Office object library.

Have you first declared DlgOpen, ie.

Dim DlgOpen As FileDialog

[pc2]
 
Yep. Excatly that.

But having declared the variable or not is not too important as to whether the method of DialogBox should show
up as a member of "Application" once the library has beeen referenced.

If you type in (it would not run but you can still do it)

Application.

And if the correct library is referenced I should get the FileDialog member as a selection, but i don't. Its as if the method doesn't exist even though i am able to declare a variable as a FileDialog. Which is confusing. Makes me think either the library is corrupt or that i missing something so very simple.
 
thread705-1153012

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
Yeah, that didn't solve the issue. Its all good having the code, but if VBA is not going to recognise the FileDialog data member its not going to run.

Libraries people !!! Are people using this function with the "microsoft office 11.0 object library"

I have aslo loaded

"Microsoft Scripting Runtime...
"Microsoft Office Runtime...
"ActiveX Data Objects 2.1
"Microsoft DAO 3.6
"Microsoft Office Control 1.0
"DirectX 7 and 8
"Visual Basic for Applications
"Microsoft Access 9.0
"OLE Automation


I have run out of idea's
 
Are people using this function with the "microsoft office 11.0 object library"

Yes, i do.

My references are:

Visual Basic for Applications

Microsoft Access 11.0 Object Library

OLE Automation

MS DAO 3.6 Object Library

MS ActiveX Data Objects 2.1

MS Outlook 11.0 Object Library
 
Microsoft Access 9.0
Ac2k don't have the Application.FileDialog property ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
RoyVidar said:
(thread705-1153012)If you're using 2002 or higher versions, you should be able to use the FileDialog, for instance like this:



________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top