Hi all,
I am trying to save filters so I can restore later and the logic that sets my criteria1 value fails with "1004 application or object defined runtime error" when the filtered column is a date.
Does anyone know a way to do this when dealing with dates? thanks in advance and happy holidays everyone
mike
here is an extract of code where save filter fails:
Select Case .Operator
Case 1, 2 'xlAnd, xlOr
filterArray(f, 1) = .Criteria1
filterArray(f, 2) = .Operator
filterArray(f, 3) = .Criteria2
Case 0, 3 To 7
filterArray(f, 1) = .Criteria1 <- runtime error here with date filter
filterArray(f, 2) = .Operator
Case Else
filterArray(f, 2) = .Operator
colorcolcount = colorcolcount + 1
strArray = Split(Cells(1, f).Address, "$")
colorcol = strArray(1)
End Select
Bookmarks