-
RunTime error 462 - The remote Server machine does not exist.
I am trying a simple transfer data from Excel to Access database but I keep getting this error if I try it the second time. First time it works fine. based on Microsoft article, I am not able to fix the issue. Can some one help please?
Dim acApp As Object
mysheet = "C:\Incident3.xlsx"
myrange = "Sheet1!A1:G12"
Set acApp = CreateObject("Access.Application")
acApp.OpenCurrentDatabase ("C:\MyTest1.accdb")
'acApp.Visible = True
'acApp.UserControl = True
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, "MyTable400", mysheet, True, myrange
acApp.CloseCurrentDatabase
acApp.Quit
Set acApp = Nothing
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules