Use static arrays
Hello,
I would like to use the static declaration for an array. However I have
some difficulties on the subject.
Public Function KeysResult(aPResult, bSet As Boolean) As Variant
'-------------------------------------------------------------------------'
If bSet Then
Static aResult(conTotalModules) As Boolean
aResult = aPResult
Else
KeysResult = aResult
End If
End Function
Public Function KeysDLine(aPDLines, bSet As Boolean) As Variant
'------------------------------------------------------------------------'
If bSet Then
Static aDLines(conTotalModules) As Variant
aDLines = aPDLines
Else
KeysResult = aDLines
End If
End Function
This give an error like : <can't assign to array. Any idean how to solve
this ?
Many thanks
|