This should work from anywhere in the workbook with NO selections necessary
or desirable
sub clearrowsinothersheet
Sheets("Breakdown").Range("$a" & Range("RowCountplusone") &
":bz1000").clearcontents
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Emma Hope" <(E-Mail Removed)> wrote in message
news:22CBF803-725D-4F37-BA88-(E-Mail Removed)...
>i have a named range RowCountPlusOne which holds a number i.e. i want to
>use
> VBA to clear the cells after a certain number of rows i.e. row 34 to row
> 1000.
>
> The code below just errors, can anyone else with what i am doing wrong.
>
> Sheets("Breakdown").Select
> strSelection = "$A$" & Range("RowCountPlusOne") & ":$BZ$1000"
> Range(strSelection).Select
> Selection.Clear
> Range("A1:A2").Select
>
> Thanks
> Emma
>