ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ListView selection (https://www.excelbanter.com/excel-programming/398863-listview-selection.html)

avi

ListView selection
 
Hello,

How do I allow a user to selrct the content of a ListView and copy it
by a RightClick

Thanks
Avi


JLGWhiz

ListView selection
 
ListView is not a built in function of VBA. You would have to construct the
list in Excel and then develop the controls and code for a user to display it
by clicking a button or using a keyboard command key.

"avi" wrote:

Hello,

How do I allow a user to selrct the content of a ListView and copy it
by a RightClick

Thanks
Avi



Leith Ross[_2_]

ListView selection
 
On Oct 7, 6:54 pm, JLGWhiz wrote:
ListView is not a built in function of VBA. You would have to construct the
list in Excel and then develop the controls and code for a user to display it
by clicking a button or using a keyboard command key.

"avi" wrote:
Hello,


How do I allow a user to selrct the content of a ListView and copy it
by a RightClick


Thanks
Avi


Hello Avi,

Here is a sample of List View I used in VBA. My UserForm had a
ListView and 3 TextBoxes. This is taken from the Click event...

Private Sub ListView1_ItemClick(ByVal item As MSComctlLib.ListItem)

Dim RowNumber

RowNumber = item.Index

With ListView1.ListItems(RowNumber)
TextBox1.Text = .Text
TextBox2.Text = .SubItems(1)
TextBox3.Text = .SubItems(2)
.EnsureVisible
End With

End Sub

The Text property returns the item in the first column. Each
additional column is designated by the SubItems property. To JLGWhiz -
the ListView control can be added by going to "Additional Controls..."
under Tools menu in the VBIDE. You must have a UserForm in your
project selected and the control toolbox visible to access these
controls.

Sincerely,
Leith Ross


avi

ListView selection
 
Tanks

Avi



All times are GMT +1. The time now is 01:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com