Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello, In a workbook I need to import tables from one mdb password protected database to another mdb unprotected database. I though to use the following subroutine: Sub Export(dbname As String, tbSource As String, tbDestination As String) Dim dbSourcePath As String, dbTargetPath As String, oApp As Access.Application On Error GoTo err_hnd 'Path dbname Application.AutomationSecurity = msoAutomationSecurityLow dbSourcePath = ThisWorkbook.Path & "\" & dbname dbTargetPath = ThisWorkbook.Path & "\" & "ImportExport.mdb" 'Apre Access Set oApp = CreateObject("Access.Application") oApp.Visible = False 'Apre nomedb oApp.OpenCurrentDatabase dbSourcePath, , PWORD oApp.DoCmd.TransferDatabase acExport, "MS Access", dbTargetPath, acTable, tbSource, tbDestination oApp.Quit Set oApp = Nothing Exit Sub err_hnd: MsgBox Err.Description & "/" & Err.Number & " Sub Export" Resume Next End Sub However I get the 2507 error on the docmd.transferdatabase statement that says "MS Access database type not installed or task not allowed" Any tip? Thanks -- eggpap Excel 2003 on Vista HP System - can use VBA ------------------------------------------------------------------------ eggpap's Profile: http://www.thecodecage.com/forumz/member.php?userid=90 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=83143 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do i import excel tabs in access with Docmd | Excel Programming | |||
DoCmd.SendObject (E-mail) | Excel Programming | |||
Delete Worksheets Prior To Access DoCmd.TransferSpreadsheet | Excel Programming | |||
how to format a Docmd to pull in an Access file in Text format | Excel Programming | |||
DoCmd.OpenReport problem | Excel Programming |