ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,226
- Office Version
- 2007
- Platform
- Windows
Morning,
I use the following code shown below.
Currently when i double click a cell in column A my userform opens.
What i would like to also be able to do is to double click a cell in column B & copy & paste cell values to another worksheet within the same workbook.
Example.
Double click cell B100
"Code will now copy cell values & paste to another worksheet in same workbook"
Worksheet DATABASE copy cell value R100 & paste to worksheet INVOICE cell G14
Worksheet DATABASE copy cell value S100 & paste to worksheet INVOICE cell G15
Worksheet DATABASE copy cell value T100 & paste to worksheet INVOICE cell G16
The cell that is double clicked will always be column B
The cell values to be copied will always be from columns R,S & T on the same row.
The paste locations will always be cells G14,G15 & G16
Thanks
I use the following code shown below.
Currently when i double click a cell in column A my userform opens.
What i would like to also be able to do is to double click a cell in column B & copy & paste cell values to another worksheet within the same workbook.
Example.
Double click cell B100
"Code will now copy cell values & paste to another worksheet in same workbook"
Worksheet DATABASE copy cell value R100 & paste to worksheet INVOICE cell G14
Worksheet DATABASE copy cell value S100 & paste to worksheet INVOICE cell G15
Worksheet DATABASE copy cell value T100 & paste to worksheet INVOICE cell G16
The cell that is double clicked will always be column B
The cell values to be copied will always be from columns R,S & T on the same row.
The paste locations will always be cells G14,G15 & G16
Thanks
Rich (BB code):
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Range("A6", Cells(Rows.Count, "A").End(xlUp)), Target) Is Nothing Then Exit Sub
Cancel = True
Database.LoadData Me, Target.Row
End Sub