Dim i, value, total As Integer value = 1 total = 1 For Each i In CheckedListBox1.CheckedIndices value *= 2 total += value Next