range(range("A1"), range("A1").SpecialCells(xlLastCell))

  • Thread starter Thread starter no.reply7
  • Start date Start date
N

no.reply7

I'm puzzled. I had a perfectly working code using

range(range("A1"), range("A1").SpecialCells(xlLastCell)).copy

and

range(range("A1"), range("A1").SpecialCells(xlLastCell)) .AutoFilter
Field:=2, Criteria1:="36084"

and all of a sudden, I get this error message:

Compile error: Wrong number of arguments or invalid property assignment

Any thoughts?

Thanks.
 
I'm puzzled. I had a perfectly working code using

range(range("A1"), range("A1").SpecialCells(xlLastCell)).copy

and

range(range("A1"), range("A1").SpecialCells(xlLastCell)) .AutoFilter
Field:=2, Criteria1:="36084"

and all of a sudden, I get this error message:

Compile error: Wrong number of arguments or invalid property
assignment

Any thoughts?

First thought, cut/paste the actual problem code into a message, before
posting it to usenet. Impossible to diagnose syntax errors when you retype
the code. (Not that I myself would see it in this case, necessarily, but
neither I nor anyone else has a chance given what you've offered.)
 
Back
Top