Option Explicit Sub TestModExists() Debug.Print ModExists("ArcID") Debug.Print ModExists("xyz") End Sub Function ModExists(name As String) As Boolean ModExists = False Dim pVBE As VBIDE.VBE Set pVBE = Application.VBE Dim l As Long For l = 1 To pVBE.VBProjects.Count Dim k As Long For k = 1 To pVBE.VBProjects(l).VBComponents.Count If pVBE.VBProjects(l).VBComponents(k).Type = vbext_ct_StdModule Then Dim s As String s = UCase(pVBE.VBProjects.Item(l).VBComponents(k).name) If s = UCase(name) Then ModExists = True Exit Function End If End If Next k Next l End Function
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.