Excel Crazy

Listbox in Excel VBA

An Excel VBA listbox, is a drop down list from where the user can make a choice. Learn how to draw a listbox on your worksheet, how to add items and how to execute result with help of VBA code.

Draw a Listbox

Click on the Insert from the Developer tab and then click on List Box in the Active X controls section.

 

 

 

 

 

 

Draw Listbox in your worksheet and enter some values in column A.

 

 

 

 

 

 

 

 

 

Add Items in Listbox:

Select Design mode from the Developer Tab, then right click on List box and select Properties. Fill A1:A12 for ListFillRange.

 

 

 

 

 

 

 

 

 

 

Now double click on the Listbox (make sure design mode is selected). Write the below mention code on Listbox Click Event.

Private sub Listbox1_Click()

MsgBox “List box has been clicked, selection is “ & Listbox1

End Sub

Click Here to Download the file

March 15, 2012

0 responses on "Listbox in Excel VBA"

Leave a Message

Your email address will not be published. Required fields are marked *

top
 

© LOKESH PALIWAL 1987 - 2018

LOKESH@EXCELCRAZY[DOT]COM | 8826547882

Reporting Solutions | Data Consulting | Analytics Training

CONTACT US
close slider

Your Name (required)

Your Email (required)

Your Phone no. (required)

Your Message for us...

Skip to toolbar