+91-8826547882

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 10, 2012

0 Responses on Listbox in Excel VBA"

Leave a Message

© copyright www.excelcrazy.com. All rights reserved. Design and Development by www.creativebrainweb.com