Public Function VBComponentNameIsUnique( _ wb As Workbook, _ strInputName As String _ ) As Boolean Dim vbc As VBComponent VBComponentNameIsUnique = True For Each vbc In wb.VBProject.VBComponents If vbc.Name = strInputName Then VBComponentNameIsUnique = False End If Next vbc End Function
Leave a Reply