I'll probably need to ask more questions, shilabrow, but let's start here: This code appears to have at least two syntax errors in it:
Code:
Sub Prices()
Selection.AutoFilter
' |
' Invalid space here --------------- v
ActiveSheet.listObjects("MyDatabse"). Range.Autofilter Field:=4, Criteria1:="=yes", Operator:=xlOr, Criteria2:="="
' |
' Missing argument name ("Field", I suppose) here --- v
ActiveSheet.ListObjects("MyDatabase").Range.AutoFilter:=6, Criteria1:="=Complete", Operator:=xlOr,Criteria2:="="
Cells.Select
Selection.Copy
Sheets("Result").Select
Range("A1").Select
ActiveSheet.Paste
End sub
And judging by the capitalization, you didn't cut and paste it from the VBA editor but just typed it, some of it anyway, into here by hand.
Now, the real problem is that you're using features of which I'm ignorant; I don't know what ListObjects is and I almost never use Autofilter even manually. But before I ask more about those, can you show the real program, just to eliminate confusion (mine)? Better yet, can you just post the workbook?