Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autofilter Office Web Component Excel Sheet

Status
Not open for further replies.

smeridew

IS-IT--Management
Sep 11, 2000
47
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top