View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
TK TK is offline
external usenet poster
 
Posts: 177
Default Using ADO CurrentProject in Excel

Hi Paul:
I trying to understand what you want to accomplish.
Lets say everyone here understands that ADO
(ActiveX Data Objects ) are objects, properties,
methods , arguments and events in Visual Basic
primarily used to connect to and manipulate records
returned from databases.
What is the purpose of using ADO to connect to
Excel when you are in Excel and further you cannot
use ADO methods to manipulate the rs if you are not
in Visual Basic.
Are you sending the rs to other backends ?

Good Luck
TK



---------------------------------
"Paul" wrote in message
...
Hi All,
I could really use some help. I'm writing some VBA code in Excel and I
want
to use an ADO connection to the data to populate a number of recordsets
but
I'm having some trouble defining the connection. Does anyone know if there
is
an Excel equivilent of Access's CurrentProject? I can define a connection
to
the current database in Access like this:

Dim conGlobalConnection as new ADODB.Connection

conGlobalConnection.Open CurrentProject

This is much like DAO's Currentdb. I would like to use the same in Excel
but
CurrentProject doesn't work and I can't find what it should be. I haven't
tried just using the path as I'm not sure where the SSheet will end up and
so
would like to avoid declaring it that way, also I think the only time I've
tried this in the past I got read only errors.

Any help would be appreciated

Many Thanks
Paul