Hi all

I have a sub that runs on a button click which I want to create a new instance of a custom class and add it to a list of already created instances of this class. I want the result to be a List Of collection of all of my class instances.

My problem is that each time I run the sub, it simply 'overwrites' the first instance of the class and adds a copy of it to the list instead of writing a new instance. My code is along these lines :-

Code:
dim objFixture as new clsFixture

For n As Integer = 1 To intNoOfChannels
     objFixture.SetChannelAddress(n, intCurrentChannelTotal + 1)
     intCurrentChannelTotal += 1
next

lstFixtures.Add(objFixture)
Can anyone let me know what I'm obviously doing wrong?

Hope that makes sense

Andy