K
Kevin O'Neill
I've tried to pass the array multiple times using different things, all
of which have returned a compile error. I'm not very familiar with VBA,
is what I'm doing correct? Way off?
Suggestions?
The first sub creates the array, the 2nd sub recieves it, and the 3rd
sub fires the first 2 arrays in order. I get the compile error on the
3rd sub.
------------------------------------------------------------------------------
Sub NewCalcSheet()
Dim ends(20) As Integer
Dim c2(5) As Integer
Dim ab
For d = Sheet11.Cells(18, 14).Value - 1 To 0 Step -1
'Large Amount of Code Left out
'Large Amount of Code Left out
'Large Amount of Code Left out
ends(ab) = Range("A50000").End(xlUp).Row
ab = ab + 1
Next d 'end stud loop
c() = ends()
ReDim Preserve c(Sheet11.Cells(18, 14).Value - 1)
Button38_Click c
End Sub
------------------------------------------------------------------------------
Sub Button38_Click(ByRef c())
End Sub
------------------------------------------------------------------------------
Sub CommandButton1_Click()
Sheet14.Select
CreateCalcSheetArray.NewCalcSheet 'Do Stuff "Calc Table"
Sheet11.Select
PrintArea.Button38_Click (c) 'COMPILE ERROR HERE
End Sub
------------------------------------------------------------------------------
of which have returned a compile error. I'm not very familiar with VBA,
is what I'm doing correct? Way off?
Suggestions?
The first sub creates the array, the 2nd sub recieves it, and the 3rd
sub fires the first 2 arrays in order. I get the compile error on the
3rd sub.
------------------------------------------------------------------------------
Sub NewCalcSheet()
Dim ends(20) As Integer
Dim c2(5) As Integer
Dim ab
For d = Sheet11.Cells(18, 14).Value - 1 To 0 Step -1
'Large Amount of Code Left out
'Large Amount of Code Left out
'Large Amount of Code Left out
ends(ab) = Range("A50000").End(xlUp).Row
ab = ab + 1
Next d 'end stud loop
c() = ends()
ReDim Preserve c(Sheet11.Cells(18, 14).Value - 1)
Button38_Click c
End Sub
------------------------------------------------------------------------------
Sub Button38_Click(ByRef c())
End Sub
------------------------------------------------------------------------------
Sub CommandButton1_Click()
Sheet14.Select
CreateCalcSheetArray.NewCalcSheet 'Do Stuff "Calc Table"
Sheet11.Select
PrintArea.Button38_Click (c) 'COMPILE ERROR HERE
End Sub
------------------------------------------------------------------------------