Import from Excel by browsing?

LeeSmith

Registered User.
Local time
Today, 17:37
Joined
Mar 17, 2006
Messages
27
Hi there,

I'm trying to create a button on a form that will allow my database user to import from excel by browsing. I'm currently using the code below which allows them to import providing the file is in the right place with the right name

Dim stMessageBox As String

stMessageBox = MsgBox("Do you wish to update the records with a new spreadsheet", vbYesNo, "Import?")

If stMessageBox = vbYes Then
DoCmd.Save

Me.LastUpdated = Now
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "AUTUMN 06", "P:\foldername\filename.xls", True, ""
Exit Sub
End If

If stMessageBox = vbNo Then
Exit Sub
End If


Does anyone know of a way I can do the same but open a browser window and choose the Excel file? Any help is appreciated.

Cheers

Lee
 
there is a sample by Ghudson (i think) that is Brill and does this check for it on this sample is 4 other type of bril examples
do a find by
browse

if you cannot find it - ping me and I will find my copy
 
found my copy
g
 

Attachments

Users who are viewing this thread

Back
Top Bottom