Using Excel as front end to Access database (with VBA)

前端 未结 12 2119
我在风中等你
我在风中等你 2021-01-30 17:42

I am building a small application for a friend and they\'d like to be able to use Excel as the front end. (the UI will basically be userforms in Excel). They have a bunch of dat

12条回答
  •  粉色の甜心
    2021-01-30 18:05

    I did it in one project of mine. I used MDB to store the data about bills and used Excel to render them, giving the user the possibility to adapt it.

    In this case the best solution is:

    1. Not to use any ADO/DAO in Excel. I implemented everything as public functions in MDB modules and called them directly from Excel. You can return even complex data objects, like arrays of strings etc by calling MDB functions with necessary arguments. This is similar to client/server architecture of modern web applications: you web application just does the rendering and user interaction, database and middle tier is then on the server side.

    2. Use Excel forms for user interaction and for data visualisation.

    3. I usually have a very last sheet with some names regions for settings: the path to MDB files, some settings (current user, password if needed etc.) -- so you can easily adapt your Excel implementation to different location of you "back-end" data.

提交回复
热议问题