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.
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.