Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
I am trying to write a macro that will take info from excel and write it to an access database. The macro will be used by people who don't have Access on their computers, and who don't have references to the DAO object library. I can get it to work if they go into the VB editor and select Tools/references and set the reference, but I would prefer not to have to walk everyone through that process. I am thus trying to declare my objects as generic object types and use late binding like thus: Sub input() Const Path As String = "C:\Test\LoginTest.mdb" Dim db As Object Dim rs As Object Dim objAcc As Object Dim ws As Object Set objAcc = CreateObject("DAO.DBEngine") Set db = objAcc.OpenDatabase(Path) Set rs = db.OpenRecordset("Control Table") rs![Control Processor]=Range("A1").value rs.Close db.Close Set objAcc = Nothing End Sub But when I get to the OpenDatabase method part, I keep getting "Out of memory" error. Anyone know how I could accomplish my goal? TIA Chris |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Binding a Graphic | Excel Discussion (Misc queries) | |||
Late Binding issue with Excel.Application object | Excel Discussion (Misc queries) | |||
Late binding to Excel from Access causing Object error | Excel Discussion (Misc queries) | |||
excel file late for opening big size 20.60 mb ? | Excel Discussion (Misc queries) | |||
VB Extensibility library and "late binding" | Excel Discussion (Misc queries) |