The TagSearch property of the ApplicationObject returns a TagSearch Object. The ApplicationObject creates a new TagSearch object the first time that the TagSearch property is accessed and subsequently returns the same TagSearch object.
When programming in Visual Basic 6, there is no need to declare the ApplicationObject. The ApplicationObject is automatically created the first time that the TagSearch dialog is shown by TagSearch.Show. See the help on the TagSearch object for more information.
If you are programming in C++, Visual Basic .Net, or C# it is recommended to create the ApplicationObject for purposes of showing the TagSearch dialog. This is because the TagSearch object could not be created without using the ApplicationObject before version 18.104.22.168 of the PISDKDlg.dll, which was first delivered with version 1.3.1 of the PI-SDK. If you create a TagSearch object without using the ApplicationObject, then your application will not work properly if the pisdkdlg.dll is not at least version 22.214.171.124 on the target machine. If you are not concerned about backward compatibility, then it is OK not to use the ApplicationObject and to create the TagSearch object directly.