View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
François François is offline
external usenet poster
 
Posts: 40
Default 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