poopla #1 Global TypeCount Function Create_MyType() M.MyType = new MyType TypeCount = TypeCount + 1 End Function Function Delete_MyType(M.MyType) Delete M TypeCount = TypeCount - 1 End Function I'd do what perturbatio said(like the example above).