COMO ATUALIZAR COLLECTION ?
Como atualizar collection ?
Alguém conhece algum esquema para se atualizar uma collection sem ser este:
'Tenta adicionar
On Error Resume Next
m_colExecucoes.Add 55, CStr(5)
'Se deu erro, remove e adiciona novamente
If Err.Number <> 0 Then
m_colExecucoes.Remove 4
m_colExecucoes.Add 55, CStr(5)
End If
Alguém conhece algum esquema para se atualizar uma collection sem ser este:
'Tenta adicionar
On Error Resume Next
m_colExecucoes.Add 55, CStr(5)
'Se deu erro, remove e adiciona novamente
If Err.Number <> 0 Then
m_colExecucoes.Remove 4
m_colExecucoes.Add 55, CStr(5)
End If
On Error Resume Next
Dim Cur As Long
Cur = m_colExecucoes.Count
m_colExecucoes.Add 55, CStr(5)
'Se deu erro, remove e adiciona novamente
If Err.Number <> 0 Then
If Not m_colExecucoes.Count = Cur Then
m_colExecucoes.Remove Cur
m_colExecucoes.Add 55, CStr(5)
else
m_colExecucoes.Add 55, CStr(5)
End If
End If
Dim Cur As Long
Cur = m_colExecucoes.Count
m_colExecucoes.Add 55, CStr(5)
'Se deu erro, remove e adiciona novamente
If Err.Number <> 0 Then
If Not m_colExecucoes.Count = Cur Then
m_colExecucoes.Remove Cur
m_colExecucoes.Add 55, CStr(5)
else
m_colExecucoes.Add 55, CStr(5)
End If
End If
Tópico encerrado , respostas não são mais permitidas