Expand|Select|Wrap|Line Numbers
- Dim catalog As COMAdmin.COMAdminCatalog
- Dim Applications As COMAdmin.COMAdminCatalogCollection
- Dim Application As COMAdmin.COMAdminCatalogObject
- Dim Components As COMAdmin.COMAdminCatalogCollection
- Dim comps As COMAdmin.COMAdminCatalogObject
- Dim ComDllName As COMAdmin.COMAdminCatalogObject
- Dim Index As Integer
- Set catalog = New COMAdmin.COMAdminCatalog
- Set Applications = catalog.GetCollection("Applications")
- Call Applications.Populate
- For Each comps In Applications
- On Error Resume Next
- Dim orchapplication As Integer
- applicationname = InStr(1, comps.Name, "somename", vbTextCompare)
- If Not applicationname = 0 Then
- Set Components = Applications.GetCollection("Components", comps.Key)
- Call Components.Populate
- For Index = 0 To Components.Count - 1
- Components.Remove (Index)
- If Err Then
- AppendStatus (comps.Name & " " & Err.Description & " " & Err.Source)
- Else
- AppendStatus (Components.Item(Index).Value("Name") & " was removed ")
- End If
- Next
- Components.SaveChanges
- End If
- Next
any idea where i might be going wrong ?
I have tried putting the following statement also before removing :
Components(Index).Value("Deletable") = True
But this doesnt work either
Any help appreciated .