Boa noite!!
Veja um modelo!
https://www.sendspace.com/file/tfrikw
Código fonte:
Crie um userfor
Private Sub UserForm_Initialize()
lastrow = Range("A" & Rows.Count).End(xlUp).Row
Dim c As Range
For Each c In Sheets("Sheet1").Range("A1:A" & lastrow).SpecialCells(xlCellTypeVisible)
UserForm1.ListBox1.AddItem c.Value
Next c
Me.lblCount.Caption = "Dados Atuais= " & Me.ListBox1.ListCount - 1
End Sub
Crie um botão em sua guia e use a macro
Sub AleVBA_15032()
ActiveSheet.Range("$A$1:$B$7000").AutoFilter Field:=1, Criteria1:= _
xlFilterToday, Operator:=xlFilterDynamic
ActiveSheet.Range("$A$1:$B$7").AutoFilter Field:=2, Criteria1:="PENDENTE"
With ActiveSheet
If .AutoFilterMode = True Then
ActiveSheet.Range("$A$1:$B$7000").AutoFilter Field:=1, Criteria1:= _
xlFilterToday, Operator:=xlFilterDynamic
ActiveSheet.Range("$A$1:$B$7").AutoFilter Field:=2, Criteria1:="PENDENTE"
Else
MsgBox "Não há dados para filtrar"
End If
End With
UserForm1.Show
End Sub
Att
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 16/03/2015 7:38 pm