Listbox Helper Class (1 Viewer)

Status
Not open for further replies.

pono1

Registered User.
Local time
Today, 13:31
Joined
Jun 23, 2002
Messages
1,186
This sample database attempts to answer the following Access VBA questions.

. How do I select all items in a listbox?
. How do I de-select all items in a listbox?
. How do I select the top item in a listbox and make sure it is visible?
. How do I select the bottom item in a listbox and make sure it is visible?
. How do I count all items in a listbox?
. How do I count only the selected items in a listbox?
. How do I get all selected items in a listbox?
. How do I determine the last item clicked in a listbox?
. How do I programmatically turn a listbox header on or off?
. How do I search for an item in a listbox?
. How do I programmatically select an item in a listbox?
. How do I create and call my own class module?
. How do I re-use the listbox helper class included here?

To re-use the code in this sample, import the class module into your project and study and mimic the code in the form module. Also, you could, conceivably, simply copy and paste methods from the class to a form or standard module.

Tested only in Access 2K running on Windows XP Pro. I hope this sample is helpful. Please post questions regardind its use in the forum.

Regards,
Tim
 

Attachments

  • ListBoxSample.zip
    107.9 KB · Views: 2,691
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom