Is it possible to link pages in two separate workbooks

taytools

New Member
Joined
Dec 7, 2017
Messages
8
Does anyone know if it is possible to link pages in multiple workbooks. I want to be able to click on a upc code in a cell and have it take me to the same upc code in a separate workbook. Does anyone know how to do this? Basically you would have to search by the upc code. I have done this in in different pages of an excel workbook, but never in two separate workbooks.

I have provided the code I used below. If anyone knows a way to modify it to work for two separate workbooks please let me know. Thanks!

Option Explicit

Public Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

Dim Found As Range

Set Found = Worksheets("Sheet1").Cells.Find(what:=Target.Value, LookIn:=xlValues, lookat:=xlWhole)
If Found Is Nothing Then
Cancel = True
Else
Cancel = False
Worksheets("Sheet1").Activate
Found.Select
End If

End Sub
 
Also I have tried this with and without using option explicit at the very beginning. Not sure if that helps. Thanks!
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
If it's highlighting this line,
Code:
[COLOR=#333333]Public Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)[/COLOR]
keep hitting F8 and see if another box pops up with a runtime error. I'm curious which part of the syntax it thinks is a variable.
 
Upvote 0

Forum statistics

Threads
1,223,270
Messages
6,171,103
Members
452,379
Latest member
IainTru

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