Hello,
I am using a combobox to allow the user to choose what constant he will be using.
Here is the code for the combobox:
Private Sub cboChoosePipe_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboChoosePipe.SelectedIndexChanged
Select Case cboChoosePipe.Text
Case "HDPE"
Dim ThermalConductivityofCarrierPipe = HDPE
Case "PVC"
Dim ThermalConductivityofCarrierPipe = PVC
Case "ABS"
Dim ThermalConductivityofCarrierPipe = ABS
Case "FRP"
Dim ThermalConductivityofCarrierPipe = FRP
Case "Copper"
Dim ThermalConductivityofCarrierPipe = Copper
Case "Steel"
Dim ThermalConductivityofCarrierPipe = Steel
Case "Ductile Iron"
Dim ThermalConductivityofCarrierPipe = Ductileiron
End Select
End Sub
Now in the click even of my "Ok" button, I added this code :
ThermalConductivityofCarrierPipe = cboChoosePipe.SelectedText.ToString
I set the variable like this:
Public ThermalConductivityofCarrierPipe As Double
Now when ever I run the program I get this error:
Conversion from string "" to type 'Double' is not valid.
How can I make this work?
Thanks!


