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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,223,885
Messages
6,175,182
Members
452,615
Latest member
bogeys2birdies

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