M
Michael
Excel 2002. I have created a macro that runs a complex autofilter (using
create macro function), and assigned it to a command button. Filter selects
rows with a date either 31/12/2004 or 31/03/2005 ( 168 out of 336 rows )
Sub Period2()
'
' Period2 Macro
' Macro recorded 17/10/2005 by NWCSQARC
'
' Keyboard Shortcut: Ctrl+r
'
Sheets("Last_4_Separate").Select
Selection.AutoFilter Field:=2, Criteria1:="=31/12/2004", Operator:=xlOr, _
Criteria2:="=31/03/2005"
End Sub
If I run the macro using the command button or the short cut key , the
autofilter runs (field arrow turns blue), but it doesn't show any records -
ie all I get is the header row and next available row 338.
If I open the autofilter, select custom and click OK the rows appear -
header row plus matching 168 rows (row number highlighted blue)
I would like the command button/shortcut key to do the same.
create macro function), and assigned it to a command button. Filter selects
rows with a date either 31/12/2004 or 31/03/2005 ( 168 out of 336 rows )
Sub Period2()
'
' Period2 Macro
' Macro recorded 17/10/2005 by NWCSQARC
'
' Keyboard Shortcut: Ctrl+r
'
Sheets("Last_4_Separate").Select
Selection.AutoFilter Field:=2, Criteria1:="=31/12/2004", Operator:=xlOr, _
Criteria2:="=31/03/2005"
End Sub
If I run the macro using the command button or the short cut key , the
autofilter runs (field arrow turns blue), but it doesn't show any records -
ie all I get is the header row and next available row 338.
If I open the autofilter, select custom and click OK the rows appear -
header row plus matching 168 rows (row number highlighted blue)
I would like the command button/shortcut key to do the same.