ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,279
- Office Version
- 2007
- Platform
- Windows
Morning,
I have the working code supplied below but wish to add some code or get advice for adding some extra code to it.
On my worksheet called G INCOME i have a section which contains some information regarding my customers,i have attached a screen shot for you.
The first entry will always be N4
So the code will delete a customers entry lets say in this case ISABEL of which is at row 13
It deletes it fine but this leaves row 13 empty.
The advice i need would be to copy / paste the entries below & move them up 1 row.
Currently im having to manualy do this each time.
For your information i also have other info on the worksheet so we need to keep within the range of this otherwise that rows info will also be deleted / altered etc
Thanks.
I have the working code supplied below but wish to add some code or get advice for adding some extra code to it.
On my worksheet called G INCOME i have a section which contains some information regarding my customers,i have attached a screen shot for you.
The first entry will always be N4
So the code will delete a customers entry lets say in this case ISABEL of which is at row 13
It deletes it fine but this leaves row 13 empty.
The advice i need would be to copy / paste the entries below & move them up 1 row.
Currently im having to manualy do this each time.
For your information i also have other info on the worksheet so we need to keep within the range of this otherwise that rows info will also be deleted / altered etc
Thanks.
Rich (BB code):
Private Sub DeleteCustomer_Click()
If ActiveCell.Column = 14 And ActiveCell.Row > 3 And ActiveCell.Value <> "" Then
Dim Answer As Long
Answer = MsgBox("ARE YOU SURE YOU WISH TO DELETE THIS CUSTOMER", vbYesNo + vbCritical, "DELETE GRASS CUTTING CUSTOMER")
If Answer = vbYes Then
ActiveCell.Resize(1, 5).ClearContents
Else
Exit Sub
End If
Else
MsgBox "NO CUSTOMER WAS SELECTED", vbExclamation, "DELETE GRASS CUTTING CUSTOMER"
End If
End Sub