E
Erik Foreman
this is what I have
'variables defined as arrays
Dim ceday(), ceti(), ceto(), ceproj(), cenotes() As String
Dim cerow As Int32
Private Sub cboEmpName_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cboEmpName.SelectedIndexChanged
Dim ename As String
cerow = 2
ename = cboEmpName.SelectedItem
EditInfo(ename, cerow, ceday(), ceti(), ceto(),ceproj () , cenotes())
'finish doing stuff
End Sub
'in another module
Public Sub EditInfo(ByVal empname As String, ByRef i As Int16, ByRef
ceday() As Array, ByRef ceti() As Array, ByRef ceto() As Array, ByRef
ceproj() As Array, ByRef cenotes() As Array)
'do stuff
i = XLObj.activesheet.Cells(1,1).currentregion.rows.count
ReDim ceday(i), ceti(i), ceto(i), ceproj(i), cenotes(i)
'do more stuff
End Sub
the arrays in Private Sub cboEmpName_SelectedIndexChanged have the ()
underlined in blue and the message is:
Number of indicies is less than the number of dimensions of the indexed
array.
Since these are all one dimension arrays I do not understand why this
error is showing up.
'variables defined as arrays
Dim ceday(), ceti(), ceto(), ceproj(), cenotes() As String
Dim cerow As Int32
Private Sub cboEmpName_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cboEmpName.SelectedIndexChanged
Dim ename As String
cerow = 2
ename = cboEmpName.SelectedItem
EditInfo(ename, cerow, ceday(), ceti(), ceto(),ceproj () , cenotes())
'finish doing stuff
End Sub
'in another module
Public Sub EditInfo(ByVal empname As String, ByRef i As Int16, ByRef
ceday() As Array, ByRef ceti() As Array, ByRef ceto() As Array, ByRef
ceproj() As Array, ByRef cenotes() As Array)
'do stuff
i = XLObj.activesheet.Cells(1,1).currentregion.rows.count
ReDim ceday(i), ceti(i), ceto(i), ceproj(i), cenotes(i)
'do more stuff
End Sub
the arrays in Private Sub cboEmpName_SelectedIndexChanged have the ()
underlined in blue and the message is:
Number of indicies is less than the number of dimensions of the indexed
array.
Since these are all one dimension arrays I do not understand why this
error is showing up.