ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   range(range("A1"), range("A1").SpecialCells(xlLastCell)) (https://www.excelbanter.com/excel-programming/378475-range-range-a1-range-a1-specialcells-xllastcell.html)

[email protected][_2_]

range(range("A1"), range("A1").SpecialCells(xlLastCell))
 
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.


Karl E. Peterson

range(range("A1"), range("A1").SpecialCells(xlLastCell))
 
wrote:
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.)
--
Working without a .NET?
http://classicvb.org/




All times are GMT +1. The time now is 04:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com