fredlo2010
06-01-2012, 07:29 AM
Hello,
To define a range using .end(xlDown)
After I recorded my macro this is what I got:
Range("C9:I9").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
I am trying to modify it to something like the one below, but it does not work. What am I doing wrong?
I am trying to select cells from C9 to I9 and then expand my selection down.
ActiveWorkbook.Sheets("MyWorkbook") _
.Range("C9:I9", Range("C9").End(xlDown)).ClearContents
Thanks for the help
To define a range using .end(xlDown)
After I recorded my macro this is what I got:
Range("C9:I9").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
I am trying to modify it to something like the one below, but it does not work. What am I doing wrong?
I am trying to select cells from C9 to I9 and then expand my selection down.
ActiveWorkbook.Sheets("MyWorkbook") _
.Range("C9:I9", Range("C9").End(xlDown)).ClearContents
Thanks for the help