Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
specifying the column for double click
Thanks to the generous contriutors here, I have the following code which
copies data from one sheet to another: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Cancel = True ' prevent double-click from causing Edit Mode in cell Application.Run "CopyProcedure" End Sub Sub CopyProcedure() ActiveCell.Range("A1:E1").Select Selection.Copy Sheets("Report").Activate mlastrow = Cells(Rows.Count, "A").End(xlUp).Row Cells(mlastrow + 1, "A").Activate Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub It works great except for one little thing: because it's supposed to copy data from columns A to E of the same row when you double-click any cell in coumn A, it also will copy the corresponding five adjacent cells no matter where you double-click on the sheet. How can I limit the code so that only when what is double-clicked is in column A will the maco activate? Thanx for any help anyone can provide on this. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Double GET-Request if click on a hyperlink in a column | Excel Discussion (Misc queries) | |||
Zip + 4 format column then must double click to change - why? | Excel Discussion (Misc queries) | |||
Click on graph bar to execute a double-click in a pivot table cell | Charts and Charting in Excel | |||
Q. How do I code a column to insert current date, when I double-click? | Excel Programming | |||
Mouse Over Graph, Capture Information on Click(Double Click) | Excel Programming |