I get an "application-defined or object-defined error" remark on the following line when I want to select a range of cells:
Sheets("sheet").Range(Cells(1, 1), Cells(k, 27)).Borders(xlDiagonalDown).LineStyle = xlNone
Why does that not work, but the following line does?
Sheets("sheet").Activate
Range(Cells(1, 1), Cells(k, 27)).Borders(xlDiagonalDown).LineStyle = xlNone
or this line also works:
Sheets("sheet").Cells(1,1).Borders(xlDiagonalDown).LineStyle = xlNone
editted for more clearance