T
Todd Huttenstine
Below is a test array. I am trying to use the Option Base
statement to make the default index set to 1 instead of
0. If I were to insert the code: Option Base 1 at the
start of the code, then I would think the result in cell
J2 would = 7. When I dont use Option base 1 statement(run
code like it is shown below) the result of cell J2 is
equal to 3 as expected, when I run the code and change the
line of the code from Range("J2").Value = Bird to Range
("J2").Value = Bird(1), the result of J2 is equal to 7 as
expected, but why when I keep the code as it is below and
add the Option Base 1 below the Private Sub
CommandButton1_Click() it gives me the error "Compile
error: Invalid inside procedure."?
Private Sub CommandButton1_Click()
Dim Bird(2) As Integer
Bird(0) = 3
Bird(1) = 7
Range("J2").Value = Bird
End Sub
Thanx
Todd Huttenstine
statement to make the default index set to 1 instead of
0. If I were to insert the code: Option Base 1 at the
start of the code, then I would think the result in cell
J2 would = 7. When I dont use Option base 1 statement(run
code like it is shown below) the result of cell J2 is
equal to 3 as expected, when I run the code and change the
line of the code from Range("J2").Value = Bird to Range
("J2").Value = Bird(1), the result of J2 is equal to 7 as
expected, but why when I keep the code as it is below and
add the Option Base 1 below the Private Sub
CommandButton1_Click() it gives me the error "Compile
error: Invalid inside procedure."?
Private Sub CommandButton1_Click()
Dim Bird(2) As Integer
Bird(0) = 3
Bird(1) = 7
Range("J2").Value = Bird
End Sub
Thanx
Todd Huttenstine