Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Probably because I forgot to put the Parenth after the last cell refrence.
strSelection = Range("$A$" & RowCountPlusOne & ":$BZ$1000") I assumed the "RowCountPlusOne" is a variable that equates to an integer value. If not, then this still would not work. The entire Range statement has to have a value that looks like: Range("$A$2:$BZ$1000") or it will give you that error message. That is why RowCountPusOne has to equal a number. "Emma Hope" wrote: Nope, still getting the same error message Run time error '1004' - application-defined or object-defined error "JLGWhiz" wrote: Maybe change this: strSelection = "$A$" & Range("RowCountPlusOne") & ":$BZ$1000" To this strSelection = Range("$A$" & RowCountPlusOne & ":$BZ$1000" "Emma Hope" wrote: 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
What am I doing wrong? | Excel Programming | |||
Insert Calculated Field (wrong Qty*Price = wrong Amount) | Excel Discussion (Misc queries) | |||
where does it go wrong? | Excel Programming | |||
Is this wrong? | Excel Programming | |||
What is wrong?? | Excel Programming |