makavelli2
IS-IT--Management
I have a program that is getting a compile errror Sub or Function not defined. Please advise. I have 3 excel programs that run at onece, then the complied information is posted to one file, here is the segment of code that is getting the error.<br>*********************************************<br>Private Function InitColumnArrays() As Boolean<br><br> Dim nColumns As Integer<br> <br> InitColumnArrays = False<br> <br> nColumns = m_sheetEquity.UsedRange.Columns.Count<br> ReDim m_aTopRtgToEquity(1 To nColumns)<br> ReDim m_aTopTrToEquity(1 To nColumns)<br> ReDim m_aTrpAvgToEquity(1 To nColumns)<br><br> If Not InitColumnArray(m_aTopRtgToEquity, ThisWorkbook.Worksheets("Equity Template", 2, m_sheetTopRtg) Then<br> Exit Function<br> End If<br> <br> If Not InitColumnArray(m_aTopTrToEquity, ThisWorkbook.Worksheets("Equity Template", 3, m_sheetTopTr) Then<br> Exit Function<br> End If<br> <br> If Not InitColumnArray(m_aTrpAvgToEquity, ThisWorkbook.Worksheets("Equity Template", 4, m_sheetTrpAvg) Then<br> Exit Function<br> End If<br> <br> nColumns = m_sheetBond.UsedRange.Columns.Count<br> ReDim m_aTopRtgToBond(1 To nColumns)<br> ReDim m_aTopTrToBond(1 To nColumns)<br> ReDim m_aTrpAvgToBond(1 To nColumns)<br><br> If Not InitColumnArray(m_aTopRtgToBond, ThisWorkbook.Worksheets("Bond Template", 2, m_sheetTopRtg) Then<br> Exit Function<br> End If<br> <br> If Not InitColumnArray(m_aTopTrToBond, ThisWorkbook.Worksheets("Bond Template", 3, m_sheetTopTr) Then<br> Exit Function<br> End If<br> <br> If Not InitColumnArray(m_aTrpAvgToBond, ThisWorkbook.Worksheets("Bond Template", 4, m_sheetTrpAvg) Then<br> Exit Function<br> End If<br> <br> InitColumnArrays = True<br><br>End Function not find column " & ThisWorkbook.Worksheets("Keys".Cells(3, 2).Value & " in worksheet " & m_sheetTrpAvg.Name<br> Exit Function<br> End If