Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 841399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:47:20+00:00 2026-05-15T05:47:20+00:00

I am looking to run SQL queries using VBA code in an Excel file.

  • 0

I am looking to run SQL queries using VBA code in an Excel file. It may sound like a bad way to do things, but the purpose of this is to support legacy functionality on a project I’m working on.

I figured out how to create an ODBC connection, but it requires several steps which may be troublesome to implement on many computers, so I’m looking into the possibility of using OLEDB to get the job done.

My question is how to go about setting things up so I can run SQL queries in Excel using VBA.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T05:47:20+00:00Added an answer on May 15, 2026 at 5:47 am

    Both ODBC and OLEDB require data providers installed on the target machine. If by “several steps which may be troublesome” you meant installing these, there’ll be a little difference.

    Provided your target operating systems don’t include Windows versions below XP, and your target database is in this list of databases supported by MDAC by default, then you won’t have to do anything special. You’d create an ADODB.Connection object and open it using one of the connection strings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 512k
  • Answers 512k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer To use XPath with LINQ to XML add a using… May 16, 2026 at 5:35 pm
  • Editorial Team
    Editorial Team added an answer Just upload the new global.asax - the next time a… May 16, 2026 at 5:35 pm
  • Editorial Team
    Editorial Team added an answer To add a pin to map you need to do… May 16, 2026 at 5:35 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I've been using Microsoft SQL Server Management Studio for multiple manual SQL queries for
I'm looking for a script or application that tidies up and reformats SQL queries.
I am writing some new SQL queries and want to check the query plans
I am developing / maintaining a tool that allows users to run queries against
In another posting: Does Linq-To-Sql support composable queries there was discussion on how to
what are the various other programs using which i can connect to odbc database
I'm looking to build a mobile version of a WordPress site and have most
I'm trying to do quite a lot of querying against a Microsoft SQL Server
I'm getting a timeout error when trying to execute a LINQ (-to-SQL) query System.Data.SqlClient.SqlException:
I'm looking for possible solutions for the following scenario: I have a service that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.