i tried what was suggested but i am getting an error.......subset of code is shown below:
Sub get_HW_Quiz_cols(Gradebook_HW_col() As String, Inputfile_HW_col() As String, Gradebook_quiz_col() As String, Inputfile_quiz_col() As String, _
Gradebook_Filename As String, HW_InputFilename As String, HW_InputFile_Sheet As String)
Dim temprange As Range
Dim temp As Integer
'get HW and Quiz cols from Gradebook
Set temprange = Workbooks(Gradebook_Filename).Worksheets(Gradebook_Sht_Nm_HW).Range("1:1")
For z = 1 To Max_HW_grades
temp = Find_next_occurance(temprange, "HW" & z, "col")
If temp <> 0 Then
ReDim Preserve Gradebook_HW_col(z)
Gradebook_HW_col(z) = alphacol(temp)
End If
Next z
'get HW and Quiz cols from Gradebook
Set temprange = Workbooks(HW_InputFilename).Worksheets(HW_InputFile_Sheet).Range("1:1")
For z = 1 To Max_HW_grades
temp = Find_next_occurance(temprange, "HW" & z, "col")
If temp <> 0 Then
ReDim Preserve Inputfile_HW_col(z)
Inputfile_HW_col(z) = alphacol(temp)
End If
Next z
End Sub
error occurs on the ReDim statements..........
Bookmarks