Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am creating a macro to transfer information from Excel to Access. Every other time I run it I get an error stating that "You cannot carry out the action at the present time". I have a feeling that Access is not closing properly after I run it the first time. Why am I getting this error? How do I fix this? Also -- how can I get the Access window to close -- the database closes just not the window? Below is my code. Thank You Dim dba As Access.Application Dim stgPath As String Set dba = CreateObject("access.application") stgPath = ("C:\fink\sta.mdb") dba.OpenCurrentDatabase filepath:=stgPath DoCmd.SetWarnings False DoCmd.OpenQuery "Delete UnlCdL", , acEdit DoCmd.TransferSpreadsheet acImport, , _ "CD LSTN", ThisWorkbook.FullName, True, "Pcday" DoCmd.SetWarnings True dba.CloseCurrentDatabase |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
truncation with imports via html | Excel Worksheet Functions | |||
Excel Access Imports | Excel Discussion (Misc queries) | |||
Data Imports incorrectly | Excel Discussion (Misc queries) | |||
Regular imports to excel | Excel Discussion (Misc queries) | |||
Updating Excel imports | Excel Programming |