a compile error

  • Thread starter moony via AccessMonster.com
  • Start date
M

moony via AccessMonster.com

Hi everbody,

I'm using Access 2000. Want to Open a file through a dialog and I am using the example below.
The problem is that the first line (Dim Fd As FileDialog) produces a Compile-error : "User-defined type not defined" even if I enabled "Microsoft Office 9.0 Object Library" and "Microsoft DAO 3.6 Object Library".

Code :

Dim Fd As FileDialog
Set Fd = Application.FileDialog(msoFileDialogOpen)
With Fd
..AllowMultiSelect = False
If .Show = -1 Then
path = .SelectedItems(1)
Else
Exit Sub
End If
End With
Set Fd = Nothing

Can I download "Microsoft Office 10.0 Object Library" and install it with access 2000?

Thanks in advance.

Moony
 
M

moony via AccessMonster.com

Tahnks a lot for your reply.
I'll give it a try and post the result here.
Tahnks again.
 
M

moony via AccessMonster.com

Me again

I tried getting the code, but as I'm a newbie and since there is no comments with the code (where to put each part of code : form, module ...) it was difficult.
Any explanation??

Thanks again.
 
M

moony via AccessMonster.com

OK got it,it's working now, but actually I need to display in the dialog box just network drives. I feel that it's impossible!! Right??

Moony
 
A

Alex Dybenko

i think you right...
well, you can check what drive was selected AFTER dialog get closed, and
then ask user to reselect
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

File Dialog 6
Show file dialog box 1
Closing Excell from Access 3
Access 2000 - FIle Open Dialogue 4
File Dialog Picker 1
fileDialog 2
FileDialog object breaks program flow. 5
File Dialog Box Problem 3

Top