Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing a Sheet
Hi, I have a bit of code e.g. Dim wk As Workbook Set wk = ActiveWorkbook Dim sht As Worksheet Set sht = wk.Worksheets("Reports") With sht ..Cells.ClearContents End With This clears the sheet, as required, BUT if I add this next: With Worksheets("Reports") Set rng = Worksheets("Reports").Range("A1").SpecialCells(xlC ellTypeLastCell) LastRow = rng.Row End With LastRow still contains the number of lines in the just cleared sheet. Can I do something to make LastRow variable correct? Thanks - Kirk |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
clearing data from excell sheet | Excel Discussion (Misc queries) | |||
Clearing data from a so called protected sheet??? | Excel Programming | |||
my macro is clearing the wrong sheet | Excel Programming | |||
Clearing old data from a sheet | Excel Programming | |||
Clearing old data from a sheet | Excel Programming |