property LookupNS.Query (Host as String) as Message
Retrieves a Message object that contains information about the Host.

TypeDescription
Host as String A string expression that indicates the host name or the IP address.  
Message A Message object that contains information about a host.

The Query property prepares the query to be sent to a DNS server. Use the QueryClass property to specify the class of the query being sent to a DNS server. Important note! The query is sent to the DNS Server only when one of the Message object properties is accessed. 

For instance, the following sample asks the DNS server about the IP address of the host:

Dim n As New LookupNS
MsgBox n.Query("microsoft.com").Address

The following sample doesn't send a query to the DNS server, because none of the Message object properties is accessed.

Dim n As New LookupNS, q As Message
Set q = n.Query("microsoft.com")

The following sample sends the query to a DNS server when Address property is called:

Dim n As New LookupNS, q As Message
Set q = n.Query("microsoft.com")
MsgBox q.Address