Hi Team,
I have visible rows in "lstDatabase" (bottom window). Is there any method to filter them or change color of whole row according to column "Status" ? For example, status "Otwarte" for yellow color or status "Zwolnione" for green color. I'd like to add additional button called like "filter" & make filtering of this window accoroding to choosen "Status". I' tried to do this manualy in both ways in excel sheet "Database" but bottom window isn't refreshed.
My code:
I have visible rows in "lstDatabase" (bottom window). Is there any method to filter them or change color of whole row according to column "Status" ? For example, status "Otwarte" for yellow color or status "Zwolnione" for green color. I'd like to add additional button called like "filter" & make filtering of this window accoroding to choosen "Status". I' tried to do this manualy in both ways in excel sheet "Database" but bottom window isn't refreshed.
My code:
VBA Code:
Sub Reset()
Dim iRow As Long
iRow = [Counta(Database!A:A)] ' indentifying the last row
With mapFORM
.cmbType.Clear
.cbRegister.Clear
.cbApprover.Clear
.ComboBox1.Clear
.cbTSRname.Clear
.txtRollNo.Value = ""
.txtTSRnumber = ""
.cmbStatus.AddItem "Otwarte"
.cmbStatus.AddItem "Decyzja"
.cmbStatus.AddItem "Retest"
.cmbStatus.AddItem "Zwolnione"
.cmbStatus.AddItem "Odrzucone"
.cmbStatus.AddItem "Zamknięte"
.Frame3.Visible = False
.Frame4.Visible = False
.SubmitButton.Visible = False
.UpdateButton.Visible = False
.lstDatabase.ColumnCount = 11
.lstDatabase.ColumnHeads = True
.lstDatabase.ColumnWidths = "60,60,80,60,60,120,300,60,60,120,60"
If iRow > 1 Then
.lstDatabase.RowSource = "Database!A2:K" & iRow
Else
.lstDatabase.RowSource = "Database!A2:K2"
End If
End With
End Sub