![]() |
get Excel array values in Visual Studio VB
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 |
get Excel array values in Visual Studio VB
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 |
All times are GMT +1. The time now is 06:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com