![]() |
|
#1
|
|||
|
|||
![]()
I would like that when the month and year are selected when clicking on the sales button pull all data refent to the month and year chosen listview form according to the image.
This is the command that I want to adapt this option. Private Sub CmdSales_Click() With ListView1 .Gridlines = True .View = lvwReport FullRowSelect = True .ColumnHeaders.Add Text:="date", Width:=60 .ColumnHeaders.Add Text:="description", Width:=200, Alignment:=2 .ColumnHeaders.Add Text:="amount", Width:=60, Alignment:=2 .ColumnHeaders.Add Text:="value", Width:=40, Alignment:=2 .ColumnHeaders.Add Text:="amount", Width:=60, Alignment:=2 End With last line = Plan3.Cells(Plan3.Cells.Rows.Count, "a").End(xlUp).Row ListView1.ListItems.Clear For x = 5 To last line Set li = ListView1.ListItems.Add(Text:=Plan3.Cells(x, "a").Value) li.ListSubItems.Add Text:=Plan3.Cells(x, "c").Value li.ListSubItems.Add Text:=Plan3.Cells(x, "d").Value li.ListSubItems.Add Text:=Plan3.Cells(x, "e").Value li.ListSubItems.Add Text:=Plan3.Cells(x, "f").Value Next End Sub |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
welcometocandyland | Word VBA | 4 | 02-08-2017 06:53 PM |
![]() |
qrcode | Word | 3 | 05-26-2015 06:38 AM |
![]() |
rsrasc | Word VBA | 6 | 04-01-2014 03:42 PM |
![]() |
rbaldwin | Word VBA | 3 | 03-14-2012 02:31 PM |
![]() |
rajpeter | Excel Programming | 2 | 09-13-2011 02:29 PM |