How to get data from a paradox table and put it into excel using VB Macro

Posted on 2006-06-06
Last Modified: 2013-12-25
Please do excuse lack of understanding here, but I want to read data directly from a paradox table and display it in Excel. I have found how to use MSQuery, and I can query the database no problem, however what I want to be able to do is run a Macro that will update my spreadsheet with data from the paradox table. My problem is a serious lack of understanding when it comes to programming visual basic, so I suppose I am looking for a starting point more than anything else.
My database tables are in c:\program files\forest\stock\data and I have set up a system dsn called "Paradox" which points to this location.

What i want to do is collect invoice information from the table "histhead.db" and display it in excel, and for the spreadsheet to update with the latest invoice data everytime the macro is run. Really just need a starting point. I have done basic work with VBScript in web applications, but never with Excel.

Please help. Loads of points available.

Question by:b1gd0g
    1 Comment
    LVL 29

    Accepted Solution

    You will want to use ADO, here is a sample:

    Here is a sample of the connections string you should be using:



    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
    When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now