LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 661
Default Using ADO CurrentProject in Excel

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
 
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



All times are GMT +1. The time now is 06:05 AM.

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

About Us

"It's about Microsoft Excel"