Access VBADiscuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
In Access Listbox: Change Property RowSourceType to ValueList, and it's correct.
In Excel, Word (using MS forms objects): it's the same like VB syntax.
Peko is correct that you need to change the RowSourceType to ValueList, but this only works when using MS Access 2002 or 2003. With MS Access 97 and 2000 the additem method is not available for listboxes and comboboxes.