Hi all I am trying to learn VB and am having trouble with some code I am using. I would like my program to output a specific number based on if a check box is checked using case statements but my code is not working.
Public Class frmBTPW Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btncalc.Click Dim dblhdr As Double Dim dblfdr As Double Dim dbltdr As Double dblhdr = 24 dblfdr = 35 dbltdr = 50 Select Case "Power Wash Rental" Case "Half Day Rental" If chkhd.Checked = True Then txtrc.Text = "poop" End If Case "Full Day Rental" If chkFD.Checked = True Then txtrc.Text = dblfdr End If End Select End Sub Private Function Button1_Click() As CheckBox Throw New NotImplementedException End Function End Class Help would be greatly appreciated.My code isn't outputting anything in the text-box.
"Power Wash Rental"supposed to represent?Objects- Controls, to be exact. You may have a checkbox (or something) with the text "Power Wash Rental" but that is just a property of that Object or Control - hence the question. As is, "Power Wash Rental" is never going to match the "Full" or "Half" Text