Why are we coding “Dim cap as Object”? What does object mean? We already did “Dim captain as String”. What is the difference? Why do we need both?
The “Dim cap as Object” in this case is similar to “Dim cap as Range” for the For Each loops. We use the cap to go through each cell in the captain list and compare each cap (or cell) value to the captain string. Cap is the cell itself in the list of captains, and captain is the string we got as an input from the batch.