RecognizeFeatureAutomatic giving errors in VBA that I am unable to resolve

Im trying to get the FeatureWorks api to work in VBA. Im trying to get the sample code to work but it keeps throwing errors.

2015 SOLIDWORKS API Help - Recognizing Features Automatically (VBA)

This line "varOut = sample.RecognizeFeatureAutomatic(option )" doesnt work. VBA is giving me "Run-time error '91': Object variable or With block variable not set". This error is usually related to usage of Set in assigning the value. In the sample varOut is defined as a variant. Ive changed some different permutations, using set/changing varOut to long/etc. Nothing seems to work. Wondering if anyone has gotten this to work.

SolidworksApi/macros