AnnGetObjectFromTag example for Visual Basic

Note: This topic is for Document/Medical only.

Private Sub Command11_Click()
   Dim hObject As OLE_HANDLE
   a$ = InputBox("Which tag should I find?")
   hObject = LEAD1.AnnGetObjectFromTag(LEAD1.AnnContainer, CInt(a$), False)
   ' if the message box shows a=a, then it is ok. If it shows a=b then the object is not found properly
   MsgBox a$ + " = " + CStr(LEAD1.AnnGetTag(hObject)) + " ?"
End Sub