Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use VBA to Save a Class Module or Standard Module?

Status
Not open for further replies.

Pelegrinus

Technical User
May 4, 2003
2
US
Using VBA code, I successfully add or import a standard module or class module into my current accdb Access database (2010). The newly added module shows accurately in the VB Editor window, its name is the correct name for the module, and it executes properly. BUT, it is not saved yet in the CurrentProject object. How can I use VBA code to save the module without having to take any manual steps (e.g., when I manually save the module, I am asked to confirm the module name; when I have to do this with multiple modules that I import, the process is tedious). I've looked in Application.VBE.ActiveVBProject.VBComponents and in Application.CurrentProject but have not seen anything that solves my question. (CurrentProject.UpdateDependencyInfo will save the module put requires that I confirm the module name.) I REALLY would appreciate any specific suggestions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top