Automation Error

I am working on active X VB dll which is creating propertymanager page in SolidWorks.

I am calling this dll through VB exe project. This propertypage manger is shown through callback menu

This page has 2 buttons ok and cancel. After clicking to ok or cancel button page is not getting closed completely and gives automation error.

I have attached the screenshot for ref.

Kindly give me solution for the same

SolidworksApi macros