Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default DAO objects with late binding in Excel?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding a Graphic William Wolfe[_2_] Excel Discussion (Misc queries) 1 November 17th 09 08:50 PM
Late Binding issue with Excel.Application object [email protected][_2_] Excel Discussion (Misc queries) 2 August 4th 09 08:10 AM
Late binding to Excel from Access causing Object error EagleOne@microsoftdiscussiongroups[_2_] Excel Discussion (Misc queries) 4 June 14th 08 12:45 AM
excel file late for opening big size 20.60 mb ? hema Excel Discussion (Misc queries) 0 April 3rd 06 11:46 AM
VB Extensibility library and "late binding" Dennis Excel Discussion (Misc queries) 0 March 30th 05 10:51 PM


All times are GMT +1. The time now is 11:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"