Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VBA Listbox

Posted on 2012-03-23
3
Medium Priority
?
903 Views
Last Modified: 2012-03-23
Can you please help me to add values dynamically to listbox columns.?

The following code giving me an error (2nd line) "Object required"

Me.List_Box_Account.AddItem "my vlaue a1"
            Me.List_Box_Account.Column(0, 1) = "my value a2"


Requirement: Trying to populate Listbox with three columns using vba (access).

Thanks in advance
0
Comment
Question by:gtmathewDallas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 48

Accepted Solution

by:
Dale Fye earned 2000 total points
ID: 37758599
assuming that you are creating a two column list, try:

    me.list_box_Account.AddItem "my value a1; my value a2"
0
 

Author Comment

by:gtmathewDallas
ID: 37758650
Thanks a lot  Fyed,.. Its working for me.., Also I  want to thank you for your other posts- which  helped(helping) me a lot during the development..
0
 
LVL 48

Expert Comment

by:Dale Fye
ID: 37758668
Thanks,

Glad to help.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question