> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/general-resources/community/community/faq/developer-questions/how-can-a-vba-application-connect-to-mariadb.md).

# How can a VBA Application Connect to MariaDB?

A VBA application, such as a Microsoft Access or Excel macro, connects to MariaDB through ODBC. Install [MariaDB Connector/ODBC](/docs/connectors/mariadb-connector-odbc.md), then either [create a data source](/docs/connectors/mariadb-connector-odbc/creating-a-data-source-with-mariadb-connectorodbc.md) and refer to it by name, or pass a DSN-less connection string that names the driver. In both cases, use an ADO `Connection` object (or DAO, in Access) to open the connection, and run SQL statements through it.

<sub>*This page is: Copyright © 2026 MariaDB. All rights reserved.*</sub>

{% @marketo/form formId="4316" %}
