Here is the entire function:
VB Code:
Public Function DoMsg(SenderNick, Msg) Dim MsgWindow() As frmMsg, i, User(), x i = UBound(MsgWindow) + 1 'Subscript Out Of Range?! ReDim Preserve MsgWindow(i) Set MsgWindow(i) = New frmMsg For x = 0 To UBound(MsgWindow) 'Object Variable or with block not set?! If MsgWindow(x).Caption = SenderNick Then MsgWindow(x).txtRecieve.text = MsgWindow(x).txtRecieve.text & vbCrLf & "< & sendernick & " > " & msg" Exit Function Else MsgWindow(x).Show MsgWindow(x).Caption = SenderNick MsgWindow(x).txtRecieve.text = MsgWindow(i).txtRecieve.text & vbCrLf & "<" & SenderNick & " > " & Msg Exit Function End If Next x End Function
The idea is that if a form is open with the caption the same as the SenderNick it will just add the text to that form. It doesnt even get that far...
Once again, thanks for all your help everyone. I really appreciate it!




Reply With Quote