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: 2,452
Default using ado db connection in different workbook

Is it possible to use an ADO connection that has been established in one
workbook
in another workbook?
Simplified the connection has been set like this:

Public ADOConn As ADODB.Connection

Sub CreateADOConnection()

If ADOConn Is Nothing Then
Set ADOConn = New ADODB.Connection
End If

End Sub

And in another Sub:

strConn = "DSN=System 6000;" & _
"UID=" & Username & ";" & _
"PWD=" & Password
ADOConn.Open strConn


Thanks for any advice.

RBS

 
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
How to store a connection with parameters into a workbook Tom Edelbrok Excel Discussion (Misc queries) 0 November 9th 09 07:16 PM
reconnecting a workbook connection from Access-Excel Steven Cheng Excel Discussion (Misc queries) 0 December 11th 08 04:46 PM
Pivot chart loses data connection when copied to new workbook pa Charts and Charting in Excel 1 June 11th 08 05:06 PM
how do i directly edit a connection string in an Excel workbook q. SteveCarlston Excel Programming 2 February 15th 05 12:19 AM
Open a password protected excel workbook from second workbook to fetch data using dynamic connection kaustav choudhury Excel Programming 2 April 3rd 04 06:18 AM


All times are GMT +1. The time now is 09:38 PM.

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"