Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exporting Data from Excel to Access Problems
I've been trying to automate in Visual Basic the transfer
of data from Excel to Access. I have created an Excel spreadsheet that multiple users use at the same time. They import data from Access (using MS Query and it works real well) and they produce output that needs to be sent back to the same Access database. I have written VB code in Excel to open the Access database and to use the Transferspreadsheet Method from Access to pull in the data. This works great provided the database is not already opened by the user or someone else. The problem that I have is that either the user gets an error message that the database is opened by someone else and is it locked out to them, or the changes in the spreadsheet are not transfered but the data on the currently saved version on the server is transfered. Is there a way to do this in a multiple user environment? Here is some sample code that I am using. Set appMS = GetObject("G:\Database.mdb") appMS.Application.DoCmd.TransferSpreadsheet acImport, _ acSpreadsheetTypeExcel9, _ "Employees","G:\Excel\Template.xls", True, "A1:G12" appMS.Application.Quit Set appMS = Nothing Any help would be greatly aprreciated. Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Exporting data to Excel pivot table from Access | Excel Discussion (Misc queries) | |||
Exporting selected data from Access to Excel | Excel Discussion (Misc queries) | |||
exporting data from access to excel | Excel Discussion (Misc queries) | |||
Exporting data from access to excel | Excel Worksheet Functions | |||
Exporting data in Excel permanently to Access | Links and Linking in Excel |