I've never done this, but if you can do it in Excel, you can more than likely do it in Access. VBA uses same core models/code. And since you can reference specific libraries, you should be able to call on the same objects and/or event procedures.
I'm running a macro that has to open and run code from a module, then open a table after it's done. The problem is that the user can see the code module a few seconds before the table is opened. This I think would give the user a bit of a fright.
You have a design problem if your function is opening a module and also opening a table. The user should never have access to the db window or any of the db objects. They should be navigating and accessing the data through forms.
Be very carefull with the Echo method. If you do not turn if back on your users will have all kinds of problems with your db. Put the DoCmd.Echo True in that sub or functions error handler to ensure that Echo is turned back on just incase there is a runtime error within that sub or function.
This allows you to display a status bar message.
DoCmd.Echo False, "Visual Basic code is executing."
This does the same as above except no message text.
Application.Echo False