VBA hyperlink

Posted on 2013-11-15
Medium Priority
Last Modified: 2013-11-15
I understand how to use the hyperlink function, but I have been struggling with the VBA format. Here's my function:
=HYPERLINK("[Excel Formulas and Functions.xlsm]Textfunction!A1","Numeric Values")

Open in new window

I need help on the VBA dise since I'll be using a command button rather than a function.
Question by:Frank Freese
  • 4
LVL 15

Expert Comment

ID: 39651764
put this code behind the button:

Dim oExcel as Excel.Application
Dim oWB as Workbook
Set oExcel = new Excel.Application
Set oWB = oExcel.Workbooks.Open(<pathToWorkbookHere>)

Author Comment

by:Frank Freese
ID: 39651777
I meant to also state that this link is in the same workbook.

Author Comment

by:Frank Freese
ID: 39651880
The more that I think about this "hyperlink" is really a poor choice. All I am wanting to do is have a command button coded to go to a specific worksheet in my workbook. I apologize for confusion.
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

LVL 35

Accepted Solution

mvidas earned 2000 total points
ID: 39651897
Hi fh,
Worksheets("sheet name").Activate
Range("A1").Activate 'if you want a specific cell seen

Open in new window


Author Comment

by:Frank Freese
ID: 39652014
that worked just fine. I have a follow-up question coming

Author Closing Comment

by:Frank Freese
ID: 39652016
good job

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Manually copying shapes and their assigned macros one by one to a new location can be tedious, but if you use the Excel utility workbook attached to this article, the process will be much quicker and easier.
What to do if a split doesn't fit? Or a bunch of invoice lines must be rounded while the sum must match a total? It takes a little, but - when done - it is extremely easy to implement.
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…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

627 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