Solidworks API using VBA Macros

Hi Everyone, 
I am a beginner for Solidworks API and I am trying to figure out how we can Read a BOM Table From a Drawing and Populate the Values for there to a Text file ...
I have a code but In that It doesn't read the Table at all.
So I'm stuck in this task... 
It would be helpful if someone can guide me..