I have a simple code snippet that I am having some problems with and I think I am just missing something stupid. In my code I want to change a textbox value according to the value of a checkbox. If the checkbox is checked, take the textbox value and put it in parentheses (), if the checkbox is unchecked remove them. My issue is removing them and my code is below. Any help would be great. Currently the result of the code does not remove them. Maybe you can't replace something with nothing?
Dim Checked As Integer
If ckbvisible.Checked = False Then
txtposition.Text = "(" & txtposition.Text & ")"
Checked = 0
ElseIf ckbvisible.Checked = True Then
Checked = 1