2

in Excel, if I want to save my modules created for use across all Excel workbooks, I have the Personal.xlsb folder located here,

C:\Users\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLSB.

I can also save the Personal.xlsb file on a network drive for safe keeping should my computer corrupt or need re-imaging.

Where oh where is the same file for Access? Does it exist or do I have to export each module? My computer was backed up by IT and all of my Access vba modules are gone for every database I have.

Thanx!

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
mctldpro
  • 21
  • 3

2 Answers2

1

Indeed, as @stewart Ross said, there is no equivalent of the personal.xlsb file in Access. But in the VBA editor in an Access file, you can select a reference to your own "master Database". For example, my "master database" with cool and useful subs and functions is Masterdatabase.accdb and I got another database called MyNewdatabase.accdb. I open VBA editor, references, and I lookp up for my masterdatabase.accdb and mark it as a reference library, and now all code I designed in my "master database" is available in the new database.

0

There is no equivalent of the personal.xlsb file in Access. All modules are stored within the .accdb / .mdb database itself. You can export all modules and store them as text files using VBA code, as this SO answer amongst others shows:

Exporting the whole vba code from an ms access application

Stewart Ross
  • 1,034
  • 1
  • 8
  • 10
  • Thanx for the response. That is helpful. If it is in the database itself, do you know why the database is on a network drive, but the modules are now gone after the c:/ drive was re-imaged? There must be something local keeping the modules within the database. – mctldpro Jan 27 '18 at 08:45
  • Also, what does "SO" mean? – mctldpro Jan 27 '18 at 08:48
  • SO is Stack Overflow! Access applications are often split into separate back-end tables that sit on a network, and a front-end application that is on your local drive. I suspect that to be the case for you. The VBA modules would be in the C-drive front-end database, not the tables-only back end. – Stewart Ross Jan 27 '18 at 10:50