Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: Data-ManPosted on 2004-08-02 at 01:56:01ID: 11691764
If you have acccess to Excel 2002 or greater you can use the this code by setting a reference and creating an object variable within your Access 2000 code. I made a few changes, but this is air code. If you don't have access to Excel 2002, disregard...you may have to use an API to get the file open dialog.....Mike
eDialogOpe n)
Sub UseFileDialogOpen()
Dim lngCount As Long
Dim strFileNames() as String
Dim objExcel As Excel.Application
Set objExcel = new Excel.Application
' Open the file dialog
With objExcel.FileDialog(msoFil
.AllowMultiSelect = True
.Show
' Display paths of each file selected
For lngCount = 1 To .SelectedItems.Count
ReDim Preserve strFileNames(lngcount-1) 'Array starts at zero.
strFileNames(lngCount-1) = .SelectedItems(lngCount)
Next lngCount
End With
objExcel.Quit
set objExcel = nothing
End Sub