Connecting Excel spreed sheets with VBA-scripts to an Access DB
You can import or link MS Access tables and queries into MS Excel spreed sheets with simple on board tools. But these tools do not allow to set parameters in the query. To pass parameters to queries you have to use VBA scripts.
This is a collection of more or less useful examples.
In DB/Datenbanken.7z you will find a test database Spielwiese.accdb and the spreasheet Spielwiese.xslm.
A VBA class for accessing Access databases is in TAAccessDB.cls (old name AccessDB) ready for import.
The files
- InsertQueryForm.frm,
- InsertQueryForm.frx
- UpdateQueryForm.frm,
- UpdateQueryForm.frx
contain two userforms. The file RibbonButtons.bas contains macros to call the sub routines from a RibbonButton.
The files TAExel2Access.xlsm and TAExel2Access.xlam contain the full application modules, the userforms and a ribbon "Access".
under construction