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! :-)
Excel data source as Stream instead of physical path
I have a connection string as below. connectString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + "; Extended Properties='Excel 8.0;HDR=Yes;IMEX=1;ISAM=1;TypeGuessRows=0'";0 votes0 answersJERIN ANTONY3 weeks ago
Connection error to SQL in Excel 2007
Hi, I have connected a Excel 2016 file to a SQL Server and it works ok. An user, who has Excel 2007 version should use the same file and he is reporting this error while refreshing the data: Run-time error '1004': Application-defined or object-defined error.0 votes0 answersJ Jesus Romero1 month ago
Excel Chart Wizard, Connecting Scatter Diagram points
I'm composing a chart from 3 columns of data, and need help to format on Excel for Mac, Office 365. All columns are %s. first is X axis: relative % 0 - 200, of Y and Z.0 votes0 answersMarty McGowan3 months ago
Could not find installable ISAM
Hi I am using excel 2010, my excel file connected to dbf file and excel file has my pivot tables based on the dbf file and once the dbf file is updated I refresh the excel file and all the charts are updated.0 votes0 answersTauqeer Khan4 months ago
ASP connection to .xls
I am trying to insert excel data into an access database. The code below works perfectly for me even though it gives me access denied after successful upload. <% Set cn = CreateObject("ADODB.Connection")0 votes1 answerWisdom Deku4 months ago
Excel 2010 vba loses system DSN connection
I have been successfully using the following PostgreSQL connection string in multiple Excel 2010 vba applications running on 64 bit Windows 7 systems. I have moved to a Window 10 system and my application will randomly lose it's connection to the DSN.0 votes0 answersSteven Haley5 months ago
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 Hocking8 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 John9 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 kanyora11 months ago
- Load more posts