bi-dimensional arrays
Hi
You seem to have a variable called Client so:
function MakeFeeArray(Client as String) as Variant
dim fee(1 to 2, 1 to 4) as string
Dim i as integer, StrFormula4 as String
Fee(1, 1) = "mgt"
Fee(1, 2) = "admin"
Fee(1, 3) = "mgt_mgt"
Fee(1, 4) = "othersfees"
For i = 1 To 4
'in order to evaluate this formula i need the fee name and client code
StrFormula4 = "Fees(""" & Fee(1, i) & """,""" & Client& """)"
Fee(2,i) = Evaluate(StrFormula4)
Next i
MakeFeeArray = Fee
end function
In another sub/function you can then access MakeFeeArray for "Client1"
by
Dim myArrayValues as Variant
myArrayValues = MakeFeeArray("Client1")
and use myArrayValues(1,1) etc
regards
Paul
|