You are here: DEVPPL Forum Programming Visual Basic Forum
NOTIFICATIONS
54.125
MEMBERS
15.697
TOPICS
62.285
POSTS
  562
FLASH GAMES
7.740
TUTORIALS
 

Login

E-mail:
Password:

Conversion from string "" to type 'Double' is not valid.

0

Loading

Conversion from string "" to type 'Double' is not valid.

Postby Patricks » Wed Feb 16, 2011 9:17 pm

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!
Patricks
 
Reputation: 0
Posts: 1
Joined: Wed Feb 16, 2011 9:08 pm
Highscores: 0
Arcade winning challenges: 0

Conversion from string "" to type 'Double' is not valid. - Sponsored results

Sponsored results

Login to get rid of ads

 

^ Back to Top