Listbox in Excel VBA

Share Now


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.

Listbox in Excel VBA image_1

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.

Listbox in Excel VBA image_3

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



Share Now
November 16, 2019

0 responses on "Listbox in Excel VBA"

    Leave a Message

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

    Tableau Training in Delhi

    EC Analytics will help your business make better decisions by providing expert-level business intelligence (BI) services. Forecasting, strategy, optimization, performance analysis, trend analysis, customer analysis, budget planning, financial reporting and more. EC Analytics also offers Advanced Data Analytics training in corporate and retail.

    Address

    NM 23, SECTOR 14, OLD DLF COLONY,
    GURGAON (HARYANA)
    0124- 4601426

    Featured Testimonial

    I worked with...Read more

    Tushar Srivastava (Health Economic Modeler)

    CHEORS India Private Limited

    EC Analytics Consulting @ 2019 ALL RIGHTS RESERVED