P
Pasty
Hi there I have used the AutoFilterMode = False in my code but for some
reason when I apply the filter to the date the arrows are still there - does
anyone know where I may be going wrong (code is at the bottom if wish to look
at that)
Also I have noticed that when I bring up the userform I am using to filter
it will always contain the information that people last searched by - is
there anyway to set this so it always comes up as blank when the form is
loaded?
Sub filterISRisk()
'
Application.ScreenUpdating = False
filterIS.Show
ISMonth = filterIS.cmbMonth.Value
ISName = filterIS.cmbName.Value
'filterIS.Hide
If ISName = "" & Worksheets("Sheet1").AutoFilterMode = True Then
Worksheets("Sheet1").ShowAllData
With Worksheets("Sheet1")
..Select
..AutoFilterMode = False
If ISName <> "" Then
Range("A1").AutoFilter Field:=2, Criteria1:=ISName
Range("A1").AutoFilter Field:=1, Criteria1:=ISMonth
Else
filterIS.Hide
End If
End With
Application.ScreenUpdating = True
End Sub
reason when I apply the filter to the date the arrows are still there - does
anyone know where I may be going wrong (code is at the bottom if wish to look
at that)
Also I have noticed that when I bring up the userform I am using to filter
it will always contain the information that people last searched by - is
there anyway to set this so it always comes up as blank when the form is
loaded?
Sub filterISRisk()
'
Application.ScreenUpdating = False
filterIS.Show
ISMonth = filterIS.cmbMonth.Value
ISName = filterIS.cmbName.Value
'filterIS.Hide
If ISName = "" & Worksheets("Sheet1").AutoFilterMode = True Then
Worksheets("Sheet1").ShowAllData
With Worksheets("Sheet1")
..Select
..AutoFilterMode = False
If ISName <> "" Then
Range("A1").AutoFilter Field:=2, Criteria1:=ISName
Range("A1").AutoFilter Field:=1, Criteria1:=ISMonth
Else
filterIS.Hide
End If
End With
Application.ScreenUpdating = True
End Sub