Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating A 1-D Array From An Excel Spreadsheet

Status
Not open for further replies.

adamanthaea

Programmer
May 13, 2004
4
0
0
US
In the continuing saga of rewriting this program, I have finally figured out what the previous programmer was doing. Part of what was happening was that a Mathematica list was being created out of cells in an Excel spreadsheet. For example,

Code:
Application.Run "MathDefine", "xv", Range(Cells(12, 13), (Cells(12, 12 + ncomp))
creates a list named "xv" that is in a range from M13 to M12 plus some user-defined value.

Anyway, I'd like to emulate this list creation in VBA. I was thinking of creating a 1-D array with values coming from the Excel spreadsheet. While I think I see an easy way the problem of declaring the correct size of the array, I'm not sure how to enter values into the array from the Excel spreadsheet. Is there an easy way to do so?
 
Take a look at the ReDim instruction.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top