Where do you define the variable "win" and what data type is it.
Almost certainly you havent instantiated an instance of the data Type for the variable win.
Normally this is evident by a line something like
Code Snippet
Dim Win as NEW xxxxx
where xxxxx is the data type
The new keyword instantiates an instance of the type, creating an object.
If you have something like
Code Snippet
Dim Win as xxxxx
Then you have created a variable which can hold a reference to an object of type xxxxx but its not set to anything, and is therefore set to nothing (null) so when you try and use it you will generate a null reference exception.
So your going to need to look back in your code to find where win is actually instantiated.