Object Manager question

When I create groups of shapes with my macros, my Object Manager often freezes and doesn't unless I create a new layer.  Also it will show objects that were deleted via code.  I've tried refreshing the window but it does nothing.   Is there anyway to refresh the Object Manager via code.