Don't DIM "s" as an array, it has to be a variant.
--
Regards,
Luc.
"Festina Lente"
"Noel Rietman" wrote:
This should be easy but I have researched eight VB books without solving it.
How can I get the array values which are in a named (defined) Excel worksheet
into an array in Visual Studio VB 2005 (not VBA). I have tried
s = wSheet.Range("foo")
where "foo" is defined in the workbook as a two dimension array in F15:G15
and s is dimensioned as s(2) in VB. I am also unable to get the values into
s when I substitute "F15:G15 for "foo" in the code.
Thanks very, very much.
Nol Rietman