Im using WithEvents to use a winsock object in my class
(uses as following: Dim WithEvents wskConnection as Winsock )
Now in my class initialize method, I use the following code:
wskConnection.Close
and I get an error 91...
![]()
Here is a code snippet:
VB Code:
Option Explicit Dim WithEvents wskYMSG As Winsock Public iUsers As Integer '# of users in the room Public iPrivates As Integer '# of private messages received Private Sub Class_Initialize() sStatus = "offline" iUsers = 0 iPrivates = 0 wskYMSG.Close End Sub
When I create a new object, and the class initializes, I get an error 91, I click Debut, and the line wskYMSG.Close is highlited..




Reply With Quote