Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default ADO connection not opening in Excel 2003

Hi, I've been setting the following connection string with no problems in VBA
in Excel 2002:

cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
ThisWorkbook.Path & "\" & ThisWorkbook.Name & ";Excel 8.0;HDR=No;IMEX=1;"

However, this causes my Excel 2003 to crash horribly when the connection is
opened.

connectionstrings.com gives the following:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended
Properties="Excel 8.0;HDR=No;IMEX=1";

I've tried including the "Extended Properties=" and tried most permuations
of quote marks and Chr(32) - all just make the VBA stop in its tracks rather
than crashing Excel.

Anyone got any ideas? Do I need a different connection string for Excel 2003?
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
Opening a PDF in Excel 2003 Kimberly Excel Discussion (Misc queries) 3 November 26th 08 05:02 PM
ODBC connection trough Visual Basic in Excel 2003 Cato Larsen Excel Programming 0 February 20th 08 02:37 PM
DB connection 2003 vs 2007 Jordan Excel Discussion (Misc queries) 1 October 30th 07 11:58 PM
opening excel files from access 2003, win xp, office 2003 Nugimac Excel Discussion (Misc queries) 2 April 26th 07 12:32 PM
How do I set up my ODBC Connection from AS/400 file in Excel 2003 HTIMAPICSAdmin Excel Discussion (Misc queries) 0 June 1st 05 08:13 PM


All times are GMT +1. The time now is 04:49 PM.

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"