H
Harry
Hi All
I have this weird bug in the code below:
Dim temp As String = oAction.ActionType.ToString
For Each ctl As Control In Me.Controls
If ctl.Tag IsNot Nothing Then
ctl.Visible = ctl.Tag.ToString.Contains(temp) '<------error here
ctl.Enabled = ctl.Visible
End If
Next
The error is: IndexOutOfRangeException (Index -1 does not have a value)
I have a number of controls on the form that are visible depending on the
value I put in the tag property
I have this weird bug in the code below:
Dim temp As String = oAction.ActionType.ToString
For Each ctl As Control In Me.Controls
If ctl.Tag IsNot Nothing Then
ctl.Visible = ctl.Tag.ToString.Contains(temp) '<------error here
ctl.Enabled = ctl.Visible
End If
Next
The error is: IndexOutOfRangeException (Index -1 does not have a value)
I have a number of controls on the form that are visible depending on the
value I put in the tag property