By Justin W on Wednesday, 16 June 2021
Posted in VBA Development
Likes 0
Views 1K
Votes 0
hello everyone
Why can't I use the VBA code to delete the unspecified functions under the function folder.
My code is as follows:

Public Function DeleteDropAfterNothingFunction(ofunction As ObjectItem)
Dim oFuncs As ObjectItems
Set oFuncs = ofunction.FindObjects(aucObjFunction, aucSearchHierarchical)
Dim oFuncArr() As ObjectItem
oFuncArr = ObjItemsToArr(oFuncs)
Dim i As Integer
For i = 0 To UBound(oFuncArr)
If oFuncArr(i).Children.Count <= 0 Then
Call oFuncArr(i).Delete(False, aucDeleteTDeleteSheetAndRepresentationObjects)
End If
Next i
Exit Function
End Function


thank you
View Full Post