redspanna
Well-known Member
- Joined
- Jul 27, 2005
- Messages
- 1,604
- Office Version
- 365
- Platform
- Windows
Hi all,
I have this code that was kindly given by a post on here several months back and I now wish to change it slightly, the user double clicks on a text string and then after a popup checking for varification the whole line of data is removed.
the change to the code I would like is this:_
before the whole line is removed can it first be copied into next available row in "database" sheet. Once copied then the selected line (ie the original code) can be removed.
I'm guessing that the
would be changed....but not sure how
many thanks in advance
I have this code that was kindly given by a post on here several months back and I now wish to change it slightly, the user double clicks on a text string and then after a popup checking for varification the whole line of data is removed.
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
rspn = MsgBox("You have chosen to delete " & Cells(Target.Row, 2) & " " & Cells(Target.Row, 3) & Chr(10) & "Is that correct?", vbYesNo)
If rspn = vbYes Then Target.EntireRow.Delete
End Sub
the change to the code I would like is this:_
before the whole line is removed can it first be copied into next available row in "database" sheet. Once copied then the selected line (ie the original code) can be removed.
I'm guessing that the
Code:
if rspn=vbYes Then Target.EntireRow.Delete
many thanks in advance