I have a 3 checkboxes and a sub that handles all 3 of their CheckChanged events. Basically I need to prevent them from unchecking ALL as at least 1 needs to be checked. When they uncheck the lasted checked box it will give a messagebox stating they need to select at least 1, and i want it to recheck the one they just unchecked. I imagine I would be able to reference it via the sender object passed in, but I am having a hard time figuring out how to reference this to the checkbox itself?

I got this code to work, but im not sure if I NEED to actually create a new object to accomplish this

VB Code:
  1. MessageBox.Show("At least 1 checkbox must be checked", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error)
  2.             Dim MyCheck As New CheckBox
  3.             MyCheck = CType(sender, CheckBox)
  4.             MyCheck.Checked = True
  5.             MyCheck = Nothing
is this efficient?