---
title: "CheckedListBox Control in VB.Net"  
description: "CheckedListBox is a combination of a ListBox and a CheckBox. CheckedListBox can have items added using the String Collection Editor or their items can"  
author: "Pushpendra Singh"  
published: 2010-12-11  
updated: 2019-09-07  
canonical: https://www.mindstick.com/articles/292/checkedlistbox-control-in-vb-dot-net  
category: "vb.net"  
tags: ["vb.net"]  
reading_time: 2 minutes  

---

# CheckedListBox Control in VB.Net

CheckedListBox is a combination of a [ListBox](https://www.mindstick.com/articles/626/listbox-events-in-c-dot-net) and a [CheckBox](https://www.mindstick.com/articles/291/how-should-use-checkbox-control-in-vb-dot-net). CheckedListBox can have items added using the [String](https://www.mindstick.com/interview/22908/what-are-java-string-class-method) [Collection](https://www.mindstick.com/articles/1718/collections-in-java) [Editor](https://www.mindstick.com/forum/78/how-avoid-the-html-tag-and-remove-the-formating-of-copy-in-ajax-editor) or their items can add dynamically from a collection at run time, using the Items [property](https://www.mindstick.com/articles/198559/an-ownership-of-property-in-hua-hin).\

[Drag and drop](https://www.mindstick.com/forum/454/how-to-drag-and-drop-multiple-image-from-one-canvas-to-onther-canvas-in-html5) a CheckedListBox from toolbox on the [window form](https://www.mindstick.com/forum/527/how-to-pass-datagridview-s-cells-value-to-another-window-form)

![CheckedListBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/69ec925b-562d-4edc-9c85-db23f712a678/images/c5f13846-02f9-48a6-a7b7-7466515e08f9.png)

CheckOnClick property should be true in CheckedListBox so that when you click on the Text then references checkbox is checked.

## Code:

```
Public Class mindstick       Private Sub CheckedListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckedListBox1.SelectedIndexChanged           Label2.Text = "You selected  " + CheckedListBox1.SelectedItem.ToString()     End Sub     Private Sub mindstick_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)  Handles MyBase.Load         ' Here items is added in the CheckedListBox1         CheckedListBox1.Items.Add("C#")         CheckedListBox1.Items.Add("J#")         CheckedListBox1.Items.Add("VB")     End SubEnd Class
```

In above code Item is added dynamically so all Item in CheckedListBox1 will show at run time.

**Run the [project](https://yourviews.mindstick.com/story/1788/things-to-ensure-your-construction-project-is-successful)**

![CheckedListBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/69ec925b-562d-4edc-9c85-db23f712a678/images/d155425a-8530-46cb-8ece-8abeb974459e.png)

When you select the given option then SelectedIndexChanged event will fire and selected value will show in the Label.

![CheckedListBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/69ec925b-562d-4edc-9c85-db23f712a678/images/b366eedf-9db3-409a-8059-ea5df982ee7f.png)

## Change CheckedListBox Appearance

Set the forecolor of checkedListBox on FormLoad event as

```
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load        CheckedListBox1.ForeColor = Color.GreenEnd Sub
```

ForeColor of CheckedListBox will be changed at run time.

**Output:**

![CheckedListBox Control in VB.Net](https://www.mindstick.com/mindstickarticle/69ec925b-562d-4edc-9c85-db23f712a678/images/85514dcd-583c-4326-9d18-e4e0589f987b.png)

---

Original Source: https://www.mindstick.com/articles/292/checkedlistbox-control-in-vb-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
