Solved

Modifying a Hyerlink to another worksheet

Posted on 2014-01-24
13
145 Views
Last Modified: 2014-01-24
Folks,
I am using a command button to move me to a specific location on a different worksheet. Here's the code and it works fine:
Application.Goto Sheets ("Text").Range ("A47"),True

Open in new window

Currently I am using a hyperlink, and it works. See code:
=HYPERLINK("[Excel Formulas and Functions.xlsm]TEXT!A199","TEXT - Guidelines for Adding Spaces")

Open in new window

Is it possible to modify the hyperlink to work like the command button does by having the Range select go to the top?
0
Comment
Question by:Frank Freese
  • 7
  • 4
  • 2
13 Comments
 
LVL 18

Accepted Solution

by:
Steven Harris earned 334 total points
ID: 39807405
You can add in a macro that will make the hyperlink perform as the button:

Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)
Application.Goto Reference:=ActiveCell, Scroll:=True
End Sub

Open in new window

0
 

Author Comment

by:Frank Freese
ID: 39807465
This time you've stumped me.
My hyperlink is created in the formula bar.
I've pasted your code into my worksheet that contains the hyperlink formula. No change so it tells me that I am unable to personally connect the dots as you are suggesting. I don't know how to connect the hyperlink formula with the suggested macro?
0
 
LVL 18

Assisted Solution

by:Steven Harris
Steven Harris earned 334 total points
ID: 39807474
The code will go into the "This Workbook" sheet in the VB Editor. You will not need to modify your hyperlink.

What this does is capture the action of clicking on a hyperlink, then process the request as "Application.Goto" where you scroll the linked location to the top of the page.

If this still doesn't work with the manual hyperlink formula, try using the right-click > Insert > Hyperlink version to insert a link.
0
 
LVL 48

Expert Comment

by:Rgonzo1971
ID: 39807484
Hi,

The code should be in the ThisWorbook module

Regards
0
 

Author Comment

by:Frank Freese
ID: 39807551
OK...code copied and pasted the in ThisWorkbook. When I click on the hyperlink the new code is never executed?
0
 
LVL 48

Assisted Solution

by:Rgonzo1971
Rgonzo1971 earned 166 total points
ID: 39807568
Hi,

Have you closed an reopened your file?

Regards
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:Frank Freese
ID: 39807584
no...let me try that now
0
 

Author Comment

by:Frank Freese
ID: 39807601
ok
Closed Excel and reopened the file
Clicked on the hyperlink and all I get is some weird video and the icon going around and around in circles
I'm going to shut down the laptop and then try again.
0
 
LVL 18

Expert Comment

by:Steven Harris
ID: 39807623
If this still doesn't work with the manual hyperlink formula, try using the right-click > Insert > Hyperlink version to insert a link into the cell.
0
 

Author Comment

by:Frank Freese
ID: 39807654
Got this from Excel:
Not enough system resources to display completely.
This worksheet has multiple hyperlinks BTW. Would that matter?
0
 
LVL 18

Expert Comment

by:Steven Harris
ID: 39807664
This worksheet has multiple hyperlinks BTW. Would that matter?

Shouldn't matter.

Not enough system resources to display completely.
What size is the file?

You can also check some simple steps that has helped others with this error, such as setting all page zoom levels to the same size.  Why it would matter is beyond me...
0
 

Author Comment

by:Frank Freese
ID: 39807683
6mb
Something else is going on though. I removed the code from ThisWorkbook, saved the workbook, restarted the notebook and went back to the hyperlink function that I as using. The problem is the same. Fortunately, I saved this file as a revision first so I have the original file. Let me snoop through this worksheet and get back with you all
0
 

Author Closing Comment

by:Frank Freese
ID: 39807956
thanks
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

760 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now