Double click on cell to copy cell value to another workbook

EileenJohn

Board Regular
Joined
Nov 23, 2016
Messages
53
Hi, I need help. I have 2 different workbooks. Workbook 1 and 2.
Let's say when I double click on any cells in range c:c and it will
1. Open IE
2. At the same time, direct user to the sheet (it will copy the cell value on the click cell to another workbook and activate the sheet.)

Right know, I'm still working on how to copy the cell value. (Open workbook and copy the cell value)

I'm using this code:
Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel=SellClick(Target)
If Intersect (Target, Range (C:C)) Is Nothing Then
Else
ActiveCell.copy Destination := Workbooks("Workbook2").Sheets("sheet1").Range("B2")
Workbooks("Workbook2").Sheets("sheet1").Activate
End If
End Sub

But, the above code only works if I open "Workbook2" before I click on the cell in "Workbook1".

And how to call the above code using function? I using function to call "openIE"
Function sellClick(ByVal Target As Range) As Boolean
With Target
Call OpenIE
End If

Thanks in advance.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,224,815
Messages
6,181,136
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top