Excel 2010 crashes when attempting to open ADODB.Connection
I hope everyone is well and hope someone might be able to suggest how to resolve the below issue...
My Excel 2010 crashes when attempting to open ADODB.Connection (establishing connection to later use recordset to read contents of another sheet within the same Excel file).
Everything was working absolutely fine until few weeks ago with the issue first observed shortly after Skype for Business was distributed/installed on our PCs (or possibly due to some other Microsoft system update applied at the same time).
Below is a short/relevant code excerpt:
Dim cn As ADODB.Connection
strCon = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & strFile & ";Extended Properties=""Excel 12.0 Xml;HDR=Yes;IMEX=1"";"
Set cn = CreateObject("ADODB.Connection")
cn.Open strCon ' - the code crashes here every time - without fail...
I'm running Excel Office 2010 (32bit) on Win7 Enterprise (64bit) system (it is on an enterprise network so can't really do anything about the Office/Win versions).
Would anyone happen to know or have any ideas as to how to overcome the problem?
Thank you all so kindly for any suggestions you may throw my way. Your help is greatly appreciated.
I managed to overcome the problem by replacing the initial connection string as per below:
GetConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFile & ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"";"
Not sure whether this is the best/most effective data connection available within my current environment (Office 2010 (32-bit) running on Win7 Enterprise (64bit) system) - but it works! :-)
Microsoft.ACE.OLEDB.12.0 connect xltm file type
Is there a way to use Microsoft.ACE.OLEDB.12.0 in order to connect to a excel xltm (macro enable template)? Thanks0 votes0 answersRobin Hocking2 months ago
Study Guides or Test Sample for the position of Admin asst?
Study Guides or Test Sample for the position of Admin asst? I’m testing for administrative Asst in the civil service sector.So I’ve to take a test to MS Word and Excel. and it’s practical to test my abilities.0 votes5 answersLiza John3 months ago
System.ArgumentException: Keyword not supported: 'provider'
Hi , kindly assist.. am trying to import data from excel to sql database. am using excel 2016. am getting the following error " "System.ArgumentException: Keyword not supported: 'provider"0 votes1 answerjohn kanyora5 months ago
Oracle SQL Developer version 1.2.1 connection issue
hi, I am using Oracle SQL Developer version 1.2.1. I want to connect to the Database server using VBScript. I wrote the below code but getting an Error "database source not found and no default driver specified".0 votes0 answersSrashti9 months ago
Export from Excel to AccessDB, error Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
I try to export some data from excel to my access database, but on line 15 rs.open I get the error Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. I can't seem to figure out what is going wrong here. Any help would be appreciated, thanks!0 votes1 answerArne Clicteur10 months ago
Access to Sybase Anywhere 8.0 with Excel VBA
Hi! I Need make a connection to Adaptive Server Anywhere 8.0 database using Excel 2013+VBA commands, Someone who can help me0 votes0 answersMiguel CABRAL10 months ago
VBA Excel to send data to Oracle..need help
I have a project where I have to send data from an Excel spreadsheet to an Oracle database. I have installed the latest Oracle client and the ODBC drivers.0 votes1 answerHenry Forteon Jan 28, 2017
vba code to extract data from sql
I'm trying to export the data from multiple database from a single server into one excel using VBA code. Please can anyone help.0 votes1 answerSheik Sulthanon Dec 08, 2016
Universal connection string
Hi My system reads Excel data using a database approach. I use the following connection string as this returns extended characters: Provider=Microsoft.ACE.OLEDB.12.0;Data Source='';Extended Properties="Excel 12.0 Xml;HDR=YES;IMEX=1";0 votes1 answerChris Devrellon Nov 08, 2016
- Load more posts