PhilBarnes
Technical User
Here is my problem:
the above is a snippet of my code and shows what im trying to do. It is incomplete I realise panelists is an array as soon as I Redim although what im looking to do is if there are no panellists then set the current Redim'd array of 300 empty rows to nothing.
Is there any way of doing this? "Set panelists = Nothing" seems to be incorrect.. Thanks in advance for any assistance
Code:
ReDim panelists(300)
y = 1
Do While Not EOF(1) ' Loop until end of file.
Line Input #1, panelists(y) ' Add Mnemonic to array
y = y + 1
Loop
If IsArray(panelists) Then
ReDim Preserve panelists(y - 1)
Else
Set panelists = Nothing
End If
the above is a snippet of my code and shows what im trying to do. It is incomplete I realise panelists is an array as soon as I Redim although what im looking to do is if there are no panellists then set the current Redim'd array of 300 empty rows to nothing.
Is there any way of doing this? "Set panelists = Nothing" seems to be incorrect.. Thanks in advance for any assistance