I have a problem with some code that I wrote. It gives me an error called Method of data member not found. Don't understand and can't fix it.
Can you help???
Code:
With Sheet2
'get rid of any null strings stored in the cells for Print
With .Range("Cp3:Df3980")
.Value = .Value
End With
With .Sort
'set up the sort fields for Print on (data tab)
With .SortFields
.Clear
.Add Key:=Sheet2.Range("Cp3:Cp3980"), _
SortOn:=xlSortOnValues, _
Order:=xlAscending, _
DataOption:=xlSortNormal
.Add Key:=Sheet2.Range("Cq3:Cq3980"), _
SortOn:=xlSortOnValues, _
Order:=xlAscending, _
DataOption:=xlSortNormal
End With
End With
'set up the rest of the sort and apply for Print
.SetRange Sheet2.Range("Cp3:Df3980")
.Header = xlNo
.MatchCase = False
.Orientation = xlSortColumns
.SortMethod = xlPinYin
.Apply
End With