![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi Friends,
I want to handle double click event on ListBox selected item so that it should get invoked when user double clicked on some item. Also please let me know how to get which item has been selected. The following method is not working: Sub ListBox1_DoubleClick MsgBox "Double clicked" End Sub Thanks, Paresh |
#2
|
|||
|
|||
![]()
Most controls placed on an Outlook form will only fire one event, even if
they expose additional events in their object model. In the case of a list box you get the Click() event. If a multi-select list box you don't even get that. You read the selected value by looking at the Value property of that control. You can also handle the Item.CustomPropertyChange() to find when a bound list box value changes. -- 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 ... Hi Friends, I want to handle double click event on ListBox selected item so that it should get invoked when user double clicked on some item. Also please let me know how to get which item has been selected. The following method is not working: Sub ListBox1_DoubleClick MsgBox "Double clicked" End Sub Thanks, Paresh |
#3
|
|||
|
|||
![]()
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 "Ken Slovak - [MVP - Outlook]" wrote: Most controls placed on an Outlook form will only fire one event, even if they expose additional events in their object model. In the case of a list box you get the Click() event. If a multi-select list box you don't even get that. You read the selected value by looking at the Value property of that control. You can also handle the Item.CustomPropertyChange() to find when a bound list box value changes. -- 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 ... Hi Friends, I want to handle double click event on ListBox selected item so that it should get invoked when user double clicked on some item. Also please let me know how to get which item has been selected. The following method is not working: Sub ListBox1_DoubleClick MsgBox "Double clicked" End Sub Thanks, Paresh |
#4
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Messages wont open on double click | Adam Bailey | Outlook Express | 2 | March 8th 08 02:09 AM |
Open contacts (and calendar) with a double-click | gaylin | Outlook - Using Contacts | 0 | September 2nd 07 02:42 AM |
double-click or save attachment | Steffen Heinzl | Add-ins for Outlook | 7 | November 27th 06 08:21 PM |
double click mail item | jpspringall | Outlook and VBA | 2 | May 31st 06 10:18 AM |
Tasks Not Opening on Double Click | Chrispsg | Outlook - General Queries | 2 | February 7th 06 10:47 PM |