Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have code set up to open an Access database from within Excel using a VB
module. It works, but now I want to add a password to the Access database and I can not figure out how to do it. Below is the open routine. What do I need to add to it so it opens it with a password. Sub OpenMsAccess() Dim AccessApp As Object Set AccessApp = CreateObject("Access.Application") AccessApp.Visible = True AccessApp.OpenCurrentDatabase "C:\TestDir\TestDb.mdb" 'process data AccessApp.Quit Set AccessApp = Nothing End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Mike,
Try AccessApp.OpenCurrentDatabase filepath:="C:\TestDir\TestDb.mdb", _ bstrPassword:="your password" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Mike" wrote in message ... I have code set up to open an Access database from within Excel using a VB module. It works, but now I want to add a password to the Access database and I can not figure out how to do it. Below is the open routine. What do I need to add to it so it opens it with a password. Sub OpenMsAccess() Dim AccessApp As Object Set AccessApp = CreateObject("Access.Application") AccessApp.Visible = True AccessApp.OpenCurrentDatabase "C:\TestDir\TestDb.mdb" 'process data AccessApp.Quit Set AccessApp = Nothing End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Add tab access to check boxes in a protected Excel sheet form. | Excel Discussion (Misc queries) | |||
Linking workbook and range protected Excel sheet to Access | Excel Discussion (Misc queries) | |||
How to import data from a password protected Access DB into Excel. | Excel Discussion (Misc queries) | |||
Open Access database(DAO) with password protected | Excel Programming | |||
open Access DB that is password protected | Excel Programming |