I have a class called objLocate which stores information about various searches my program performs. I also have a custom class that works like a collection. Both of the classes work correctly because I have gotten my save previous searches to work correctly. I am trying to create a list box now loaded with some standard features that will be linked to the custom collection class I created by referecing the object through the item property.
I am getting the error
Additional information: Object reference not set to an instance of an object
on the line
Dim tempObject As objLocate = New objLocate(SearchFor.RegularExpression, desMachineType.HomeWorkstation, "MA-EA.*", enumSaveName.DellTag, enumSearchTab.Basic, enumUpdateHashTable.No)
I have tried as new objLocate as well and I even tried the like that is commented out which is a function i created to create these objects from the class. I keep getting the same error.
VB Code:
lstDivisions.Items.Add("MA-EA") Dim tempObject As objLocate = New objLocate(SearchFor.RegularExpression, desMachineType.HomeWorkstation, "MA-EA.*", enumSaveName.DellTag, enumSearchTab.Basic, enumUpdateHashTable.No) 'Dim tempObject As objLocate = LoadLookingForObject(enumSearchTab.Basic, enumPresetSearch.GX110) preDivision.Add(tempObject) tempObject = Nothing lstDivisions.Items.Add("MA-FI") Dim tempObject1 As New objLocate(SearchFor.RegularExpression, desMachineType.HomeWorkstation, "MA-FI.*", enumSaveName.DellTag, enumSearchTab.Basic, enumUpdateHashTable.No) preDivision.Add(tempObject1)




Reply With Quote