Issue with SpecialCells method

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I don't know why the below code is not working -- when I run the same code
without the ".SpecialCells(x1celltypeconstants)" at the end of ".Range("D2",
..Range("D2").End(xlDown))", it works. I looked at Help and according to
help, I believe I have incoroporated SpecialCells correctly.

With Sheets("Member ID Report Master")
.Cells.Sort Key1:=.Range("D2"), Order1:=xlAscending, Header:=xlYes,
MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
Set salesrange = .Range("D2",
..Range("D2").End(xlDown)).SpecialCells(x1celltypeconstants)
End With
 
change

x1celltypeconstants

to

xlCellTypeConstants

(i.e., the second character is an "ell" not a "one")
 
Back
Top