Hi,
I have written a code to accept value entered into textboxes. Then calculate when a button 'calculate' is clicked.
How do I prompt the user if they haven't entered a value in a textbox before clicking calculate? Below is the code.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim pipediameterStr As String = pipediameter.Text()
Dim totalpipelengthStr As String = totalpipelength.Text()
Dim pipedesignlifeStr As String = pipedesignlife.Text()
Dim anodecrsectperStr As String = TextBox14.Text()
Dim utlfactorStr As String = TextBox10.Text()
Dim echemcapacityStr As String = TextBox11.Text()
Dim dccpotentialStr As String = TextBox12.Text()
Dim dppotentialStr As String = TextBox13.Text()
Dim coatingresStr As String = TextBox3.Text()
Dim initctbrkdfactorStr As String = Initialctbrkdfactor.Text()
Dim avgyrlyctbrkdfactorStr As String = avgyrlyctbrkdfactor.Text()
Dim searesistivityStr As String = TextBox5.Text()
Dim meancurrdensityStr As String = TextBox7.Text()
Dim finalcurrdensityStr As String = TextBox8.Text()
Dim indvntanodemassStr As String = TextBox2.Text()
Dim exposedanodediameterStr As String = TextBox1.Text()
Dim anodelengthStr As String = TextBox9.Text()
Dim numfieldjointStr As String = TextBox15.Text()
Dim fieldjointspacingStr As String = TextBox16.Text()
Dim engtimeinhrsStr As String = TextBox49.Text()
Dim costofengtimeStr As String = TextBox48.Text()
Dim addedcostengStr As String = TextBox47.Text()
Dim costofmaterialStr As String = TextBox46.Text()
Dim overheadmaterialexStr As String = TextBox45.Text()
Dim costofrightofwayStr As String = TextBox44.Text()
Dim costofcompconstructStr As String = TextBox43.Text()
Dim inspectiontimeStr As String = TextBox42.Text()
Dim costofinspectionStr As String = TextBox41.Text()
Dim ascostofinspectionStr As String = TextBox40.Text()
Dim costofcompsyscheckStr As String = TextBox39.Text()
Dim iccpindvnetanodemassStr As String = TextBox21.Text()
Dim totalcablelengthStr As String = TextBox18.Text()
Dim cableresistanceStr As String = TextBox6.Text()
Dim iccpanodelengthStr As String = TextBox20.Text()
Dim iccpelectrochemcapStr As String = TextBox22.Text()
Dim iccputlfactorStr As String = TextBox25.Text()
Dim iccpdccpotentialStr As String = TextBox26.Text()
Dim iccpexposedanodediameterStr As String = TextBox27.Text()
Dim iccpanodecrsectperStr As String = TextBox28.Text()
Dim iccprectdcratingStr As String = TextBox29.Text()
Dim iccprectacratingStr As String = TextBox30.Text()
Dim anodetypeStr As String = ComboBox3.Text()
Dim iccpanodetypeStr As String = ComboBox1.Text()
Dim iccpengtimeinhrsStr As String = TextBox17.Text()
Dim iccpcostofengtimeStr As String = TextBox19.Text()
Dim iccpaddedcostengStr As String = TextBox24.Text()
Dim iccpcostofmaterialStr As String = TextBox31.Text()
Dim iccpoverheadmaterialexStr As String = TextBox32.Text()
Dim iccpcostofrightofwayStr As String = TextBox37.Text()
Dim iccpcostofcompconstructStr As String = TextBox36.Text()
Dim iccpinspectiontimeStr As String = TextBox35.Text()
Dim iccpcostofinspectionStr As String = TextBox34.Text()
Dim iccpascostofinspectionStr As String = TextBox33.Text()
Dim iccpcostofcompsyscheckStr As String = TextBox38.Text()