Skip to content

"Run-time error 457:This key is already associated with an element of this collection." #9

@tvquynh

Description

@tvquynh

I got the mention problem in first time with task assigned for multi users.
Dim frmForm As New ImportBoard
frmForm.Show
If frmForm.IsCanceled Then Exit Sub

Dim board As New TrelloBoard, Cards() As TrelloCard, Data As New Datasheet
board.Boardname = frmForm.Boardname
Data.Initialize frmForm.Worksheetname, RowIndexOfHeader

'Remove all existing rows
Data.RemoveCurrentRows

'Load all cards from the board, from all lists
'Iterate over the lists and their cards
Dim List As TrelloList, RowIndex As Integer, i As Integer
RowIndex = 0
For i = 1 To board.Lists.Count
    Set List = board.Lists(board.Lists.Keys(i - 1))
    Call Data.AddRowsFromCards(board, List.Listname, List.CardsAsArray(), RowIndex) <=yellow line when go into debug
    RowIndex = RowIndex + List.Cards.Count
Next

End Sub

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions