Any way to check if a part included in the BOM with VBA

I want to develop a macro to analyze an assembly part by part. Is there any way to check if a part is included in the BOM using VBA? I only find an example with VB net. 2020 SOLIDWORKS API Help - Get Whether Component Is Envelope And Excluded From BOM (VB.NET) 

Thanks

SolidworksApi/macros