method NNTP.Connect (Host as String, [Port as Variant])
Connects the client to the news server.

TypeDescription
Host as String A string expression that indicates the news server. For instance: "news.devx.com", "news.exontrol.com", and so on.
Port as Variant A long expression that indicates the port number used to communicate with the news server. By default, the Port parameter is 119 as described in the RFC 977.
ReturnDescription
BooleanA boolean expression that indicates whether the client succeeded to connect to the server on the specified port.  
Use the Connect method to connect to a new server. Use the LastError property to get the last error occurred, if the Connect method fails.  Use the UserName and Password properties before calling Connect method if the server requires authorization. Use the Disconnect method to close the connection. Use the Group property to access a particular group by its name after the Connect method is called. Use the events Error, Command, or Result to monitor the data that the client sends to the server, and the data that the server replies to the client's commands.

The following sample connects to a news server and gets the list of available news groups:

Dim n As New EXNNTPLibCtl.NNTP

Private Sub Form_Load()
    If (n.Connect("news.devx.com")) Then
        For Each g In n.Groups
            Debug.Print g.Name
        Next
        n.Disconnect
    End If
End Sub