The variable you're using to hold your List collection is Nothing (null).
When you declared it like this:
Dim ptsid As List(Of String)
you only said that the variable
ptsid
CAN hold a
List(Of String)
. You didn't actually create the
List
.
Change that to
Dim ptsid As New List(Of String)
and you'll create the list.
This one would be really easy to find if you understood how to use the debugger.