I am having trouble applying a filter to my OWC Excel Sheet. I have a dropdown box that lets the user select the criteria based on an old date. Here's the code:
Dim StartDate As String
StartDate = ">" & Format$(DateSerial(Year(Date), Month(Date) - Combo1.Text, Day(Date)), "dd-mmm-yy"
If Len(Combo1.Text) > 0 Then
Spreadsheet1.Range("A2:R1000"
.Select
Spreadsheet1.Selection.AutoFilter
Spreadsheet1.Selection.AutoFilter Field:=11, Criteria1:=StartDate
End If
The code craps out with a run-time error -536608679
"Method 'autofilter' of object '_range' failed"
Help...
Scott Meridew
Certified MQSeries Specialist,MCSE
MQ Squared Inc.
Dim StartDate As String
StartDate = ">" & Format$(DateSerial(Year(Date), Month(Date) - Combo1.Text, Day(Date)), "dd-mmm-yy"
If Len(Combo1.Text) > 0 Then
Spreadsheet1.Range("A2:R1000"
Spreadsheet1.Selection.AutoFilter
Spreadsheet1.Selection.AutoFilter Field:=11, Criteria1:=StartDate
End If
The code craps out with a run-time error -536608679
"Method 'autofilter' of object '_range' failed"
Help...
Scott Meridew
Certified MQSeries Specialist,MCSE
MQ Squared Inc.