LeeSmith
Registered User.
- Local time
- Today, 06:44
- 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
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