Norbertus van der Lei


Is it possible to open an Excell file from Access, but the file name is variabel. So I need to choose in a dialogbox open file

Thanks,

Norbertus van der Lei




Re: open Excell file from Access with dialogbox

bi-lya


Hi!

For Office_2003
Link up "Microsoft Office 11.0 Object Library" in Tools... -> References... and write:

Code Block

Dim dlgOpen As FileDialog

...

Set dlgOpen = Application.FileDialog(msoFileDialogOpen)

With dlgOpen
.AllowMultiSelect = True
.FilterIndex = 13
.Show
myXLS = .SelectedItems(1)
End With

...






Re: open Excell file from Access with dialogbox

Norbertus van der Lei

Hello, it doesn't work in Office 2000.

Norbertus