Hi everyone i need help...
i have a listtview witch is loaded with the database and 4 textboxes to work as filters...but when i press the textboxes...an error comes up...
thanks for the help.
the error comes up in this sub()
i have in the textboxes ivent change-call sub carregar
i have a listtview witch is loaded with the database and 4 textboxes to work as filters...but when i press the textboxes...an error comes up...
thanks for the help.
the error comes up in this sub()
i have in the textboxes ivent change-call sub carregar
VBA Code:
Sub CARREGAR()
ListView1.ListItems.Clear
Sheets("folha1").Select
linha = 5
Do Until Sheets("folha1").Cells(lin, 1) = ""
If Cells(lin, 3).Row.Hidden = False Then
Set LI = ListView1.ListItems.Add(Text:=Sheets("FOLHA1").Cells(lin, 1).Value) 'ID
LI = ListView1.ListItems.Add(Text:=Sheets("FOLHA1").Cells(lin, 2).Value) 'ARTTIGO
LI = ListView1.ListItems.Add(Text:=Sheets("FOLHA1").Cells(lin, 3).Value) 'DESIGNAÇÃO
LI = ListView1.ListItems.Add(Text:=Sheets("FOLHA1").Cells(lin, 4).Value) 'NORMA
LI = ListView1.ListItems.Add(Text:=Sheets("FOLHA1").Cells(lin, 5).Value) 'EPM
LI = ListView1.ListItems.Add(Text:=Sheets("FOLHA1").Cells(lin, 6).Value) 'SECÇÃO ALMA
End If
lin = lin + 1
Loop
Label1_registos = Me.ListView1.ListItems.Count
End Sub
Attachments
Last edited by a moderator: