Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Abbie Cohen   on Nov 28 In MS Office Category.

  
Question Answered By: Sophia Campbell   on Nov 28

I do this routinely by keeping track of the currentRow while using the
scroll buttons (Worksheet is protected)

I have some custom formatting that I like to keep on screen so if the
currentRow is the last row I simple clear contents instead of deleting
the row. Deleting removes the row and causes my number formatted rows to
decrease by one so sooner or later my screen formatting gets gobbled up.

Sub cmdDelete_Click()


If lCurrentRow = nLastRow Then
Cells(lCurrentRow, 2).EntireRow.ClearContents
Else
Cells(lCurrentRow, 2).EntireRow.Delete
End If

nLastRow = Range("B65536").End(xlUp).Row

Equip_Scroll_SpinUp

Remove focus from <DELEETE> to avoid enter Key

frmEquipment.Equip_List.SetFocus

End Sub

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 


Tagged: