The checkbox visible property wants a boolean value. ANY boolean value.
txtPeriodDisplay.Text = "1"
is a boolean value. Therefore you can do this:
CB1.Visible = txtPeriodDisplay.Text = "1"
CB2.Visible = txtPeriodDisplay.Text = "2"
CB3.Visible = txtPeriodDisplay.Text = "3"
CB4.Visible = txtPeriodDisplay.Text = "4"
CB5.Visible = txtPeriodDisplay.Text = "5"
And it should have the same result.
**************** Update ****************
Oops, I didn't notice that CB1 also relied on if "2" was in the textbox...you can do something like this:
CB1.Visible = (txtPeriodDisplay.Text = "1" OrElse txtPeriodDisplayl.Text = "2")
So you can just keep adding OrElse for each case that is valid.
**************** Update ****************
Okay, How about this one?
CB1.Visible = txtPeriodDisplay.Text.Length > 0 AndAlso CInt(txtPeriodDisplay.Text) >= 1
CB2.Visible = txtPeriodDisplay.Text.Length > 0 AndAlso CInt(txtPeriodDisplay.Text) >= 2
CB3.Visible = txtPeriodDisplay.Text.Length > 0 AndAlso CInt(txtPeriodDisplay.Text) >= 3
CB4.Visible = txtPeriodDisplay.Text.Length > 0 AndAlso CInt(txtPeriodDisplay.Text) >= 4
CB5.Visible = txtPeriodDisplay.Text.Length > 0 AndAlso CInt(txtPeriodDisplay.Text) >= 5