event Command (Command as String)
Specifies the command that client sends to the server.

TypeDescription
Command as String A string expression that indicates the command that client sends to the server.
The Command event monitors the commands that the client sends to the server. Use the WithEvents keyword to declare an object variable for the source of your events.

The following sample displays the command that client sends to the server, and the response from the server. The sample displays the list of news groups available on the server.

Dim WithEvents n As EXNNTPLibCtl.NNTP

Private Sub Form_Load()
    Set n = New NNTP
    n.Connect "news.devx.com"
    Debug.Print n.Command("LIST")
    n.Disconnect
End Sub

Private Sub n_Command(ByVal Command As String)
    Debug.Print Command
End Sub