gtjr92
Programmer
- May 26, 2004
- 96
I am trying to get an average of some row totals. I know how to do that, but my average depends on what value is selected in my listbox(lbxwkid) I have tried this 2 ways I either get
Conversion from string "" to type 'Double' is not valid. for this line
or if i use
I get object not set to a reference
HEre is my code the tithecountsum is also a double.
the other way I tried was
Conversion from string "" to type 'Double' is not valid. for this line
Code:
ElseIf lbxWkid.SelectedValue().ToString > 0 Then
Code:
ElseIf lbxWkid.SelectedItem.Selected = True
HEre is my code the tithecountsum is also a double.
Code:
ElseIf lbxWkid.SelectedValue().ToString > 0 Then
Dim lbxValue As Double = Convert.ToDouble(lbxWkid.SelectedValue)
TitheAvg = TitheCountSum / lbxValue
lblAvg.Text = String.Format("{0:c}", TitheAvg)
Code:
ElseIf lbxWkid.SelectedItem.Selected = True Then
Dim lbxValue As Double = Convert.ToDouble(lbxWkid.SelectedItem.Value)
TitheAvg = TitheCountSum / lbxValue
lblAvg.Text = String.Format("{0:c}", TitheAvg)
ElseIf lbxWkid.SelectedItem.Selected = False Then
End If