Skip to content

Baselj/ExcelVBAConnectToSQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Excel VBA - connect to SQL using a custom query

Connect to SQL Database using Excel VBA

Description

Excel macro, written in VBA connects to SQL database using a query from GetSQLString function and copies the recordset into Sheet1("A1"). Error handling is included.

Requirements

  1. Excel with VBA enabled
  2. Enabled developer tab in Excel (options -> customize Ribbon, check Developer)
  3. Under Tools/References add a reference for Microsoft Activex Data Objects Library.

How do I use it?

  • Import .bas file from the commit into a new module or use the Excel which already has the module included.

About

Connect to SQL DB using Excel VBA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages