C
Cyberwolf0000 via AccessMonster.com
Hi all,
I have found this code on the MS website that loops through to give you the
module names of all the modules in a database. I would like to modify it to
just show the currently running module. I was going to convert to a function
and output the name.
Public Sub modName()
Dim modObj As Object
Dim strModule As String
Dim x As Integer
For x = 1 To Application.VBE.ActiveVBProject.VBComponents.Count
Set modObj = Application.VBE.ActiveVBProject.VBComponents.Item(x)
strModule = modObj.CodeModule.Name
Debug.Print strModule
Next x
End Sub
Any help would be greatly appreciated.
TIA,
I have found this code on the MS website that loops through to give you the
module names of all the modules in a database. I would like to modify it to
just show the currently running module. I was going to convert to a function
and output the name.
Public Sub modName()
Dim modObj As Object
Dim strModule As String
Dim x As Integer
For x = 1 To Application.VBE.ActiveVBProject.VBComponents.Count
Set modObj = Application.VBE.ActiveVBProject.VBComponents.Item(x)
strModule = modObj.CodeModule.Name
Debug.Print strModule
Next x
End Sub
Any help would be greatly appreciated.
TIA,