View Single Post
  #4  
Old August 5th 08, 04:17 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to hanlde ListBox double click event

Considering that a list box from MS Forms doesn't have either a SelectedItem
or Items property I can see why neither would work.

You really want to get in the habit of using the Object Browser in the
Outlook VBA project to see what properties, methods and events are available
on any object you want to use. The forms designer object browser is useless
for that. If you add a reference to MS Forms 2.0 to your Outlook VBA project
references you can then select that library in the VBA Object Browser and
select ListBox and see what's available to you.

The ListBox.List property gives you access to the list of items in the
ListBox. ListBox.Value gives you the selected value, as I mentioned before.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"masani paresh" wrote in message
...
Ok Ken, I have added one more button to get the selected value. But none
of
following working

MsgBox Item.GetInspector.ModifiedFormPages("Find Conference
Room").Controls("ListBox1").Items.Count

MsgBox Item.GetInspector.ModifiedFormPages("Find Conference
Room").Controls("ListBox1").SelectedItem.Value

Could you tell me whats the wrong here.

Thanks,
Paresh


Ads