Jack and Pat
drawbridgej at sympatico.ca
Fri Mar 28 13:21:47 CDT 2008
Mark, I have a routine that will do multiple databases. It doesn't use the VBE stuff that you're using. I have some code I got from the internet and it puts a bunch of modules into a table. The results can be queried. Here's some of the intro comments on the routine I use to Call the ModuleLister. Haven't used it for a while, but I have it. Jack '--------------------------------------------------------------------------- ------------ ' Procedure : jModuleLister ' DateTime : 2006-09-25 14:17 ' Author : drawbrij ' Purpose : This is the main procedure that does the calling ' to process the modules/forms/reports in other mdbs. ' ' You can list a number of databases and get all module info for review. '--------------------------------------------------------------------------- ------------ ' Sub jModuleLister() Call EnumerateModules("d:\NAICS2007_FE.mdb", "", True) ' '******************************************************************** 'If doing multiple mdbs use this template for second, third etc. * 'Call EnumerateModules("Put full database names here","",False) * '******************************************************************** 'Call EnumerateModules("C:\Jack\DATA\CCCDOCN\CCC_StandardExtractV0.mdb", "", False) 'Jack Test stuff 'Work 'Call EnumerateModules("C:\backup\RawLoaderStandardTemplate_v2 1, 09-25-2007.mdb", "", True) 'Call EnumerateModules("C:\Jack\DATA\CCCDOCN\CCC_StandardExtractV0.mdb", "", False) 'Call EnumerateModules("C:\WINNT\System32\LoaderLibrary.mda", "", False) 'Call EnumerateModules("C:\WINNT\System32\jGOLD01_A2K.mda", "", False) 'Home ' 'Call EnumerateModules("C:\WINNT\System32\LoaderLibrary.mda", "", False) 'Call EnumerateModules("C:\WINNT\System32\jGOLD01_A2K.mda", "", False) 'Call EnumerateModules("E:\A2K\Backups\RawLoaderStandardTemplate_v2.mdb 5, 04-13-2005.mdb", "", True) MsgBox "Finished Extracting Module Info" & vbCrLf & _ " Query tblModules for Details" End Sub -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte Sent: Friday, March 28, 2008 1:53 PM To: Access Developers discussion and problem solving Subject: [AccessD] VBE Experience anyone? Hello All, I am using the code below to loop through the Modules and find stuff. It always points to the current db. Is there any way to point this to a different database...if so anyone know the syntax? Thanks Again, Mark A. Matte *************** For Each vbComp In VBE.VBProjects(1).VBComponents With vbComp StartLine = 1 StartColumn = 1 EndLine = vbComp.CodeModule.CountOfLines EndColumn = 60 strCode = .CodeModule.Lines(1, .CodeModule.CountOfLines) ************* _________________________________________________________________ Test your Star IQ http://club.live.com/red_carpet_reveal.aspx?icid=redcarpet_HMTAGMAR -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com