BlueOysterCult
Well-known member
- Joined
- Oct 3, 2003
- Messages
- 84
Hello all
I think I am close to finishing this project but I am getting a "lare binding" error and cant seem to resolve it - HELP?
Rob
I think I am close to finishing this project but I am getting a "lare binding" error and cant seem to resolve it - HELP?
Code:
Dim myCarList As Object
Dim index As Integer
Dim basicCarList As BasicVehicle
Dim luxuryCarList As LuxuryVehicle
index = cmbCarList.SelectedIndex
myCarList = myCarList(index)
If TypeOf (myCarList(index)) Is LuxuryVehicle Then
luxuryCarList = CType(myCarList, LuxuryVehicle)
txtYear.Text = CStr(luxuryCarList.Year)
txtMake.Text = luxuryCarList.Make
txtModel.Text = luxuryCarList.Model
txtExtColor.Text = luxuryCarList.ExteriorColor
txtIntColor.Text = luxuryCarList.InteriorColor
txtSold.Text = CType(luxuryCarList.Sold, LuxuryVehicle)
ElseIf (TypeOf (myCarList(index)) Is BasicVehicle) Then
basicCarList = CType(myCarList, BasicVehicle)
txtYear.Text = CStr(basicCarList.Year)
txtMake.Text = basicCarList.Make
txtModel.Text = basicCarList.Model
txtExtColor.Text = basicCarList.ExteriorColor
txtIntColor.Text = basicCarList.InteriorColor
End If
End Sub
Rob