Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Use workbook name in Connection

Hello,

How do I find the name of the active workbook and use it in the following
connection string? I have tried several different things and nothing seems
to be working....i believe I have been looking at it for too long now. Any
ideas?


Private Const glob_s_Connect = "Driver={Microsoft Excel Driver (*.xls)}
;DriverId=790;Dbq=" & path_to_open_file & ";DefaultDir=C:\GelcoData;"

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Use workbook name in Connection

'ActiveWorkbook.Name' w/o the quotes gives its name.

But I'm confused. Are you trying to connect from an
application outside Excel, e.g. Access? If not, why
do you need a connection?

Hth,
Merjet

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Use workbook name in Connection

merjet wrote:
'ActiveWorkbook.Name' w/o the quotes gives its name.

But I'm confused. Are you trying to connect from an
application outside Excel, e.g. Access? If not, why
do you need a connection?

Hth,
Merjet


I am using ADO to take data from one sheet and join it with another sheet and
then dump it all into another sheet. If the data was joined already, we
wouldn't be talking. They don't want to use Access or SQL Server. They want
Excel. Kinda sucks for me, but anyway......is that enough help?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Use workbook name in Connection

I still don't know where your code is.
But try the first item under "Document" he

http://www.erlandsendata.no/english/...php?t=envbadac

If its not on that page, maybe you can find help on
another link there.

Hth,
Merjet

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
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
Problems with ADO connection to same workbook? Tim Lund[_2_] Excel Programming 1 March 14th 07 04:23 PM
using ado db connection in different workbook RB Smissaert Excel Programming 14 November 5th 06 11:36 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 10:01 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"