OTOTO
Board Regular
- Joined
- Dec 23, 2013
- Messages
- 209
HI There! I would like to add to the following code! This is used so that double clicking in column Q will paste the content of that row into the "RiskRegister" worksheet's next available row. What I would like to happen in addition to this is for that row that the content is pasted to to become unhidden. The unhiding of the rows is done manually now and it is a complete pain. Any suggestions would be helpful
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim lMaxRows As Long
If Not Intersect(Target, Columns("Q")) Is Nothing Then
Range(Cells(Target.row, "B"), Cells(Target.row, "M")).Copy
With Sheets("RiskRegister")
lMaxRows = .Cells(Rows.Count, "B").End(xlUp).row
.Range("B" & lMaxRows + 1).PasteSpecial Paste:=xlPasteAll
Application.CutCopyMode = False
End With
End If
End Sub