While looking at this code (most of which has been removed for simplification of this question), I started to wonder if I need to dispose of the collection or class that I used.
Option Explicit
Private terminals As Collection
Sub BuildTerminalSummary()
Dim terminal As clsTerminal
Call LoadTerminals
For Each terminal in terminals
...Do work here
Next terminal
Set terminals = Nothing
End Sub
Private Sub LoadTerminals()
Do
Set terminal = New clsTerminal
...Do work here
'Add terminal to terminals collection
terminals.Add terminal, key
Loop Until endCondition
End Sub
When dealing with VBA, when should I dispose of an object (if ever)?