How to copy the value of cell into clipboard by double click

  • Thread starter Thread starter lassang01
  • Start date Start date
L

lassang01

Hello,

Could anybody help to get the code that can copy the value of cell to
clipboard in double click?

I tried this but it copies the cell not the value of cell:

Private Sub Worksheet_BeforeDoubleClick(ByVal _
Target As Range, Cancel As Boolean)
On Error Resume Next
If Target.Value <> "" Then
Target.Copy
End If
Cancel = True
End Sub

Your responses are highly appreciated.

Yours:Lassaad
 
Lassaad,

Copy copies everything, it's when you paste that decisions are made. For
example, run your macro and select an empty cell and then paste special and
you'll find that you can paste anything you want. So if I have understood
correctly your macro already does what you require it's just the way you are
pasting that must change.

Mike
 
Copy copies everything, it's when you paste that decisions are made. For
example, run your macro and select an empty cell and then paste special and
you'll find that you can paste anything you want. So if I have understood
correctly your macro already does what you require it's just the way you are
pasting that must change.

Mike


Thanks, but i want to get a macro that i could copy in double click
through, a value of cell and paste it in other program.

I used to copy values from excel cell by double click and highlight
value than CTRL+C, but i need to fast copying of value by double
click.

Lassaad
 
Back
Top