EBDN - Community - Question & Answers

  Thursday, 16 May 2019
  2 Replies
  1.1K Visits
0
Votes
Undo
Hello everyone,

I tried this example Code, but it doesn't return the actual number of Children inside of recycle bin.
The recycle bin contains objects, but it always returns 0.

Public Sub IsLocalRecycleBinEmpty()
If ActiveProject.RecycleBinFolder.Children.Count = 0 Then
Call MsgBox("Recycle bin of active project is empty.";)
Else
Call MsgBox("Recycle bin of active project contains some objects.";)
End If
End Sub

I selected a project and started the macro. Am I doing something wrong?

thank you in advance