FindVBAObject

Finds specific VBA object in VBE project
User need to setup to trust VBA Access, default is not trust

Function FindVBAObject(VBAObjectname, Optional ThisWB = "This") As Boolean
 ' finds if VBA Object is found or not
 ' User need to setup to trust VBA Access, default is not trust
 If ThisWB = "This" Then ThisWB = ThisWorkbook.Name
 FindVBAObject = False
 For Each VBO In Workbooks(ThisWB).VBProject.VBComponents
  If UCase(VBAObjectname) = UCase(VBO.Name) Then
   FindVBAObject = True
   Exit Function
  End If
 Next
End Function

VBAObjectname, Optional ThisWB

Views 349 Downloads 150

'VBE Access', 'VBA', 'VBE', 'Object', 'VBAObject', 'VBProject', 'VBComponents'

ANmarAmdeen
324
Attachments
Components VBA-Excel
Revisions

v1.0