A happy error while coding in visual basic, vb.net
It is not the line where you get this error, but something that happened before, that made one of your variables invalid and unusable.
Read this. (@ NullReference Exception — Visual Basic)
Continue reading System.NullReferenceException: ‘Object reference not set to an instance of an object.’