Thread: test code
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
gavmer[_13_] gavmer[_13_] is offline
external usenet poster
 
Posts: 1
Default test code

Hello all,

The code below has been supplied to me however, i am having troubl
running it. A button on sheet 2 (quote) runs the code to delete th
ranger on sheet 1 (summary). At this point, nothing happens. The rang
name is 'appendix'. Can someone please test this????

Can this also be included to claer contents on sheet 2 (quote)

ActiveSheet.Range("D13:D15,C19:J19").ClearContents


Cheers!!!!!

Private Sub DelXtrRws ()
Dim Rng as Range, x as Single
Set rng = ActiveSheet.Range("YourRangeName")
x = rng.Rows.Count - 2
if x <= 0 then Exit Sub
rng.Offset(2, 0).Resize(x).EntireRow.Delete
End Su

--
Message posted from http://www.ExcelForum.com