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: 65
Default VBA SQL - variable Source Data...

Hi.

I'm new a this Excel/Sql thing. so bare with me :-)

My my problem is that i need to add several different (variable) SQL queries
to my WB so i´ve add the following with no success:

Cam = ActiveWorkbook.Path & "\" & "JB.xls"
...
..Connection = Array("OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;User
ID=Admin;Data Source=CAM;Mode=Share De"

it only works if i specify the complete path, not variable
..Connection = Array("OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;User
ID=Admin;Data Source=D:\TRABALHOS\2010\Março\JB.xls;Mode=Share De"

How can a make my variable with the Path work?

Thanks for reading this

SpeeD

 
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
Variable Names in Source Data References in Charts Teflon TA Charts and Charting in Excel 2 January 21st 07 05:46 AM
Variable row data source for combo boxes? AndyRoo Excel Programming 4 June 2nd 06 09:13 PM
Variable VLOOKUP source and target Vindaloo Excel Worksheet Functions 4 April 11th 06 03:56 PM
Pivot Table data source "data source contains no visible tables" Jane Excel Worksheet Functions 0 September 29th 05 08:28 PM
How do i change the graph source data to a variable dependent on the value in a cell icemonkeysteve[_2_] Excel Programming 2 October 18th 03 04:27 PM


All times are GMT +1. The time now is 09:39 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"