Menu callback function does not work

I have created activex dll in VB as SWPublished.SwAddin and I have written menucall back functions in it.

When I reference this dll in VB project function gets called but everything gets hanged I can not do anything on solidworks screen

I am first opening drawing document from vb then connecting to addin and menu gets created through adding and function is called whne user clicks on menuitem

code is as below

Public Function SwAddin_ConnectToSW(ByVal ThisSW As Object, ByVal Cookie As Long) As Boolean

Set axSldWorks = ThisSW

AXCookie = Cookie

bRet = axSldWorks.SetAddinCallbackInfo(App.hInstance, Me, AXCookie)

axMenu1 = "NewMenu"

lRet = axSldWorks.AddMenu(swDocDRAWING, axMenu1, 0)

axMenu2 =" T1@T2@"& axMenu1

Ret = axSldWorks.AddMenuItem4(swDocDRAWING, AXCookie, axMenu2, 1, "TEST", "", "", "")

SwAddin_ConnectToSW = True

End Function

I have written do loop in TEST function when this function is called solidworks gets hanged and does not allow me to select anything from screen.

Kindly guide me for the same.

SolidworksApi macros