Importing a module into access programmatically from a *.cls or similar file
ms-access, ms-access-2010, vba
Solution
Yes, that's the command `LoadFromText` to use.
Usage:
LoadFromText acModule, "NameOfObject", "FileName"
Problem
If you open Microsoft Access, then open the visual basic window so you can see the list of modules and code in your Access project. You can drag a text-based file (txt, cls, bas, etc) from windows explorer and drop it into your module folder. This drag and drop action will import the code in the text-based file into your project and prompt you to save it (with the default name being the name of the file you dropped. Is there a way to do this programmatically using VBA? It seems like a simple task that should have a simple solution, but I've been researching for days and can't seem to find a simple way to do it.