Solved

Visual Basic connect to Excel file

Posted on 2013-01-30
3
394 Views
Last Modified: 2013-01-31
In order ro connect the Excel file will I need Excel installed on my computer.
See code below.

Private m_oXlsTests As ADODB.Connection
Private m_oRdsTest As ADODB.Connection

   Set m_oXlsTests = New ADODB.Connection
    With m_oXlsTests
        .Provider = "Microsoft.Jet.OLEDB.4.0"
        .Properties("Extended Properties") = "Excel 8.0"
        strFileName = App.path & "\Tests.xls"
        .Open strFileName
    End With
0
Comment
Question by:Idarac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 38838722
No, that should not require Excel.
0
 
LVL 9

Accepted Solution

by:
shorvath earned 500 total points
ID: 38839088
You do not require Excel to be installed on a system in order to use ADO to read and write data in Excel workbooks.

http://support.microsoft.com/kb/278973

For a detailed article using VB6 ADO and Excel see this link:

http://support.microsoft.com/kb/257819
0
 
LVL 1

Author Closing Comment

by:Idarac
ID: 38839494
Perfect
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel: Macro to Contain Sorting for a Pivot Table 5 35
excel spreadsheet word wrap 6 33
Combining match and vlookup??? 4 20
Unique List in UserForm 3 19
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question