ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to copy the value of cell into clipboard by double click (https://www.excelbanter.com/excel-worksheet-functions/135916-how-copy-value-cell-into-clipboard-double-click.html)

[email protected]

How to copy the value of cell into clipboard by double click
 
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


Mike

How to copy the value of cell into clipboard by double click
 
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

" wrote:

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:



[email protected]

How to copy the value of cell into clipboard by double click
 
On 22 mar, 12:44, Mike wrote:

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



All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com