I have a form that has several combo boxes and text boxes. Based on the value of one of the combo boxes, I'd like to enable/disable some of the text boxes AND change the corresponding label of the text box.
The Problem: When I try to write the code for that, VB [2008] will not recognize the label... It doesn't appear in the drop-down "inteli-sense", and if I just write it in and try to de-bug, it errors on that line...
Here's the code:
(The label is named lblLength)
This select statement is inside this Sub:
Private Sub WorkItemComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WorkItemComboBox.SelectedIndexChanged
Is there some reason why this I'm unable to access the label text??
The Problem: When I try to write the code for that, VB [2008] will not recognize the label... It doesn't appear in the drop-down "inteli-sense", and if I just write it in and try to de-bug, it errors on that line...
Here's the code:
(The label is named lblLength)
Code:
Select Case m_Units
Case "EA"
[COLOR=red]'Me.lblLength.Text = "Count: "[/color] [COLOR=green]<--- error causing line[/color]
Case "SF"
Case "LF"
Case "SY"
Case "CY"
Case "CF"
Case "OTH"
End Select
This select statement is inside this Sub:
Private Sub WorkItemComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WorkItemComboBox.SelectedIndexChanged
Is there some reason why this I'm unable to access the label text??