View Single Post
Join Date: Mar 2007
Posts: 306
Reputation: timothybard is an unknown quantity at this point 
Solved Threads: 26
timothybard's Avatar
timothybard timothybard is offline Offline
Posting Whiz

Re: help with array please

 
0
  #2
Nov 22nd, 2008
Here is some example code of how to set up an array:

  1. 'Declare Array
  2. Dim properties(3, 1) As String
  3.  
  4. 'Set values of Array
  5. properties(0, 0) = "Plaza"
  6. properties(0, 1) = "1000000"
  7.  
  8. properties(0, 0) = "Seaside Lot"
  9. properties(0, 1) = "1500000"
  10.  
  11. properties(0, 0) = "Restaurant"
  12. properties(0, 1) = "3000000"
  13.  
  14. 'Retreive values of Array
  15. Dim newPrice, current, toBuy As Double
  16. newPrice = current + toBuy * (0.1 * properties(0, 1))

I would actually recommend using an array of a Class instead of using a multidimensional array of type string.
Reply With Quote