Say you’re processing a bunch of information and you need to clear a sheet. 

' Delete any/all records
If (ActiveSheet.UsedRange.Rows.Count) > 1 Then
'wsMasWorksheet.Range("A2").Select
'Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
'Selection.Delete Shift:=xlUp

wsMasWorksheet.Rows("2:65000").Select
Selection.Delete shift:=xlUp
lngResRng = ActiveSheet.UsedRange.Rows.Count
End If

 
Say goodbye to everything in the sheet from A2 to A65000 – all rows will be deleted.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s