Our forums are currently in maintenance mode and the ability to post is disabled. We will be back up and running as soon as possible. Thanks for your patience!



I would like to know how to create a hyperlink

By ifa.. ·
I would like to know how to create a hyperlink within an Excel file that would move from either sheet1 or sheet2. For example, the hyperlink will take me to Sheet1 if the content in Cell A3 = A and the same hyperlink will take me to Sheet2 if the content in cell A3=B..

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

hyperlink to a charge sheet

by louis_tech In reply to I would like to know how ...

Hyperlink to a Chart Sheet

You can't hyperlink to a chart directly, and a chart sheet has no underlying cells you can link to. You can fake it with a Worksheet_SelectionChange event procedure, however. In this example, the hyperlink is in cell B2. Enter the name of the chart sheet in cell B2, and format it with blue underlined text, so it looks like a real hyperlink. Right click on the sheet tab, select View Code, and paste this macro into the code module that appears:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("B2")) Is Nothing Then
On Error Resume Next
If Err.Number <> 0 Then
MsgBox "No such chart exists.", vbCritical, _
"Chart Not Found"
End If
On Error GoTo 0
End If
End Sub

When the user selects cell B2, the procedure is activated. The code jumps to the sheet with the name in the cell. If Excel cannot go to that sheet, the code assumes it's because the sheet doesn't exist, and alerts the user.

Collapse -

Theft: louis_tech aka john_tech aka technocrat25 ...

by OldER Mycroft In reply to hyperlink to a charge she ...

Another blatant cut&paste jobbie from our plagiarising chum:...

Here's where the original answer was first published, and where all credit should go to -

Related Discussions

Related Forums