0
現在の日付に基づいて、コードを使用してスプレッドシートを動的にフィルタリングしようとしています。Excel 2007でのテキストフィルタのコーディング
"CurrDay"としてフィルタリングする必要がある日付を保存しています。保存した日付をフィルタアルゴリズムに呼び戻そうとしています。それは機能していないので、私はこのコードを完成させるためにこれを行う方法を理解する必要があります。コードを実行するたびに、CurrDay変数の下に保存された日付の代わりに、CurrDayの名前がフィルタに返されます。
ここに何か不足しており、何か指示が必要です。どんな助けもありがとうございます。
CODE:
Sub Finishing_A59_Filter()
'
' Finishing_A59_Filter Macro
' This macro will activate the A59 and Filter it properly for standard orders
'
'This macro does not include the VMI's and APS orders in the code
'
'
Dim Currday As Date
Currday = Date + 7
UName = Application.UserName
Workbooks.Open Filename:="G:\Copy Modified A59 5-19-2009.xlsm", UpdateLinks _
:=0
Range("M2").Select
ActiveCell.Value = Currday
Columns("Q:Q").Select
Selection.NumberFormat = "mm/d/yyyy"
' Filter the sheet to remove VMI's and APS orders
ActiveSheet.Range("$A$3:$AA$2941").AutoFilter Field:=23, Criteria1:=Array(_
"01", "04", "06", "08", "09", "10", "15", "25", "="), Operator:=xlFilterValues
' Set the proper date range for the sheet - This needs to be seven days beyond the current date
ActiveSheet.Range("$A$3:$AA$2941").AutoFilter Field:=17, Criteria1:= _
"<=Currday", Operator:=xlAnd