-
Good morning everyone ,
Have a look below .
[Code]
CurrentSends = CurrentSends + 1
ReDim Preserve arrSendme(CurrentSends)
Set arrSendme(CurrentSends) = New Sendme
With arrSendme(CurrentSends)
arrSendme(0).Filename = Filenamestr$
arrSendme(0).Ip
arrSendme(0).Port
arrSendme(0).Size
arrSendme(0).Ext
arrSendme(0).From = SendersNick$
Case Is = 2
'User Declined File
Dim returnto As String
Dim retvalFile As String
The Bold line above causes an error . The code below is in a module
Code:
Public arrSendme() As Sendme
Public Type Sendme
Ip As String
Port As Long
Filename As String
Size As Long
Ext As String
From As String
End Type
Do you have an idea on whats going wrong ?
Thanks again guys ,
[]P
-
Hi PRIVATE1 !!!
You can't "set" an array. Set is only for Object.
the code should look like
Code:
'make sure if this in "sub" or function and arrSendme
'is public that currentsends is declared as static
' = remember symbol after calling function or sub
CurrentSends = CurrentSends + 1
'redim the array and keep the old endtries
ReDim Preserve arrSendme(CurrentSends)
'comment this line out not needed
'Set arrSendme(CurrentSends) = New Sendme
'set the values of arrsendme
With arrSendme(CurrentSends)
.Filename = Filenamestr$
.Ip
.Port
.Size
.Ext
.From = SendersNick$
end with
... and so on in your code
-
Thanks . Now I know it's only for objects .
:)
[]P