Eliminate the window movement when using =HYPERLINK() in Excel

Posted on 2011-03-22
Medium Priority
Last Modified: 2012-05-11

This is driving me nuts!!

It seems that anytime the =HYPERLINK() function in Excel (2007) has been used to create a link to a different workbook, clicking the link not only activates the target workbook but also moves it into exactly the same location on the screen already occupied by the workbook containing the link.  This appears to be the case regardless of whether the two workbooks are opened in a single Excel instance or opened in separate instances.  

The net result of course is that any advantage gained by positioning workbooks side-by-side to view them together is lost.  In other words, any desired benefit of using hyperlinks to jump quickly and easily between two workbooks, is lost since the target workbook does not remain fixed in its original position.

I suppose there are some occasions when one would want the target to move to the same location and essentially replace the initial worksheet (the one containing the link) but it seems MS would think to make that optional rather than the way it behaves in all cases.

Any suggestions on how to eliminate the window movement when using =HYPERLINK() would be very greatly appreciated!

Question by:Steve_Brady
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

by:Jignesh Thar
ID: 35192379
Steve_Brady - I didnt know about this behavior and I see that it works exactly as you described (irrespective of same or separate instance of excel). I dont believe there would be way to change this behaviour.

You might already know that there is something called Back button that you can add in "Customize Quick Access Toolbar" so that Back button (same as in internet explorer) appears when you navigate to different place using Hyperlink. Only advantage of this is an ability to return to cell from which you clicked Hyperlink. I know that this is not what you looking for (comparing worksheets side by side).
LVL 30

Expert Comment

ID: 35192450
Steve: This is something from the Excel help file. I am not sure if this helps but thought that I'd mention it.

Excel Help
To select a cell that has a hyperlink in it without jumping to the hyperlink destination, click the cell and hold the mouse button until the cursor becomes a cross , then release the mouse button.

LVL 30

Expert Comment

ID: 35192500
Here is a snapshot.


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

LVL 42

Accepted Solution

dlmille earned 1000 total points
ID: 35192528
Steve - I see the issue.  I had two worksheets ARRANGED TILED and created a simple link between the two - and it put the one on top of the other.

One potential work-around, is to have code like this:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
application.displayalerts = false
    Windows.Arrange ArrangeStyle:=xlTiled
application.displayalerts = true
End Sub

in your worksheet that has the hyperlinks.

After pulling up the workbook that the worksheet hyperlinks to, the autoarrange ensures my workbooks are side-by-side.

the arrangement of windows (if specified ahead of time) can be managed with similar code.  This was just an example that ensures the worksheets I'm working with are arranged tiled.

Are you interested in going down this path?  with some effort, it may be possible to identify where all open workbooks exist, and on the hyperlink event, ensure they revert to where they were to start with...


Assisted Solution

wellous earned 1000 total points
ID: 35192848

Here is a workaround of the issue,
Don't use Hyberlink but use Macro direct to open the workbook you want.
Create a module and paste this code into it, then save ,
the Marco will work when you press CTrl+r
Hope it helps,

Sub Macro1()
' Macro1 Macro
' Macro recorded 22/3/2011 by JZRS1446
' Keyboard Shortcut: Ctrl+r
  Workbooks.Open Filename:="E:\JZRS1446\Data\Science.xls"
' change E:/xxxxxx to the location of the file you want to open.
End Sub

Expert Comment

ID: 35193004

I think it will not work if you take it copy/paste from here ..
Please follow this steps:

/ /Download the file i attached now.
/ /save on your PC .
/ /Open your (primary)Excel file which had hyberlinks.
/ /Press Alt+F11 ( to open VB editior)
/ /Go to File then Improt the my file to your excelsheet.
/ /Modify this code : Workbooks.Open Filename:="E:\JZRS1446\Data\Science.xls"
and write the location and file name you want to open.
/ /save , then goto excel workbook and press Ctrl+r
This way it will never put one sheet on top of the other in case of two worksheets are opened together..
Hope you like it :)

Author Closing Comment

ID: 35420693

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question