I have the following code to delete and entire row - this is attached to a command button called Delete. However, I don't want to delete the entire row.
I would only like to clear the row and shift cells up, or delete and shift cells up. The reason being is that I have information to the left of this row that I do not wish to be moved.
I do understand that it could be c.EntireRow.ClearContents but I just can't seem to get this to work. Maybe I need a coffee break?
I am using Excel 2010 with Windows 7 and have posted the code below.
Many thanks in advance
Private Sub cmbDelete_Click()
Dim msgResponse As String 'confirm delete
Application.ScreenUpdating = False
'get user confirmation
msgResponse = MsgBox("Do you really want to delete this record?", _
vbCritical + vbYesNo, "Delete Entry")
Select Case msgResponse 'action dependent on response
'c has been selected by Find button
Set c = ActiveCell
c.EntireRow.Delete 'remove entry by deleting row
'restore form settings
.cmbAmend.Enabled = False 'prevent accidental use
.cmbDelete.Enabled = False 'prevent accidental use
.cmbAdd.Enabled = True 'restore use
Exit Sub 'cancelled
Application.ScreenUpdating = True