type mismatch


Posted by mes on August 16, 2001 8:12 PM

Can somebody tell me why I get a type mismatch error
on the last line? should I format the variables some-
how?

Sub lastRow()
RealLastRow = Cells.Find("*", [A1], , , xlByRows, xlPrevious) _
.Select
firstEntry = "B:63"
lastEntry = Selection.Address
Worksheets("Payroll").Range(Cells(firstEntry), _
Cells(lastEntry)).Select
End Sub

Posted by Ivan F Moala on August 16, 2001 9:20 PM

Change to

firstEntry = "B63"

PLUS

Worksheets("Payroll").Range(firstEntry & ":" & lastEntry).Select


Ivan



Posted by mes on August 17, 2001 8:28 AM

Thanks, it works great.