Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Diem Tran   on Jan 02 In MS Office Category.

  
Question Answered By: Xavier Thompson   on Jan 02

Dim YourArray(100, 10)
will declare  a two dimensionl array  with members from 0 to 100, and 0
to 10; that is with 101 x 11 elements, since vba  assumes the first
element is 0 rather than 1. You can tell vba to assume that 1 is the
first element of an array with the statement:
Option Base 1
before any procedures in a module.
Alternatively you can be explicit and declare it thus:
Dim YourArray(1 To 100, 1 To 10)
or unusually:
Dim YourArray(13 To 100, 7 To 10)
which is an array with 88 x 4 elements.

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on newbie questions Or get search suggestion and latest updates.


Tagged: