I can't figure this one out. I get a subscript out of range error in the compiled executable that I'm not getting in the IDE. The error handler that fires is in this routine:
Code:
Private Sub HeaderConfigure()

    Dim lWidth As Long, lIndex As Long

    On Error GoTo ErrHand
    MsgBox "NUM_OFFER_COLS = " & NUM_OFFER_COLS

    'Note.  If the number of elements in this array changes, NUM_OFFER_COLS should be updated.
    With lstOffers
        .ListItems.Clear
        .ColumnHeaders.Clear
        For lIndex = LBound(csColumns) To UBound(csColumns)
            If lIndex > NUM_OFFER_COLS Then Exit For
            lWidth = goOptions.GetOfferColumns(lIndex)
            If lWidth < 0 Then lWidth = DEFAULT_COL_WIDTH
            Call .ColumnHeaders.Add(lIndex + 1, , csColumns(lIndex), lWidth)
        Next lIndex
    End With

ErrHand:
    If Err.Number <> 0 Then
        Call MsgBox("Error number " & Err.Number & vbCrLf & Err.Description & vbCrLf & _
                    "in routine HeaderConfigure of OfferTray", vbExclamation, "TrialTrack Error")
    End If

End Sub
The function uses a form level array (csColumns) to create column headers for a listview control, and sets the widths from a user options object. The problem apparently doesn't lie in the widths, as when I comment out that line I get the same result. Interestingly, the message box that I stuck in to try and track the problem down is never displayed. I also tried removing the error handler and compiling it, and it did exactly the same thing. Any ideas?