M
Monique
when using the code below, i receive an error stating:
Compile error:
Method or data member not found
It was working previously and now it doesn't. I just want to be able to open
the database without the security warning appearing... import a file into it
and close the database... any suggestions would be greatly appreciated.
thanks
Private Sub ExportXLS()
Dim dbrem As Access.Application
Dim accAutoSec As MsoAutomationSecurity
Set dbrem = New Access.Application
accAutoSec = dbrem.AutomationSecurity
With dbrem
.Visible = True
.AutomationSecurity = msoAutomationSecurityLow
.OpenCurrentDatabase "C:\ReName.mdb"
End With
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "OverStock",
"C:\test.xls", True, "Stock"
With dbrem
.AutomationSecurity = accAutoSec
.Visible = False
.CloseCurrentDatabase
End With
Set dbrem = Nothing
End Sub
Compile error:
Method or data member not found
It was working previously and now it doesn't. I just want to be able to open
the database without the security warning appearing... import a file into it
and close the database... any suggestions would be greatly appreciated.
thanks
Private Sub ExportXLS()
Dim dbrem As Access.Application
Dim accAutoSec As MsoAutomationSecurity
Set dbrem = New Access.Application
accAutoSec = dbrem.AutomationSecurity
With dbrem
.Visible = True
.AutomationSecurity = msoAutomationSecurityLow
.OpenCurrentDatabase "C:\ReName.mdb"
End With
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "OverStock",
"C:\test.xls", True, "Stock"
With dbrem
.AutomationSecurity = accAutoSec
.Visible = False
.CloseCurrentDatabase
End With
Set dbrem = Nothing
End Sub