Hiding tabs that I need to link to

JSeymore

New Member
Joined
Apr 28, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi guys,

I'm not too savvy on excel, but know the basics and maybe a little more than that. I am wanting to hyperlink the Item Numbers to the tabs with the same names. I want to hide these tabs but when I do hide them, I cannot open the link when I click on them anymore. I have seen some codes on how to fix this, but they are catered to the specific question and I have been unable to make it work for me. Can anyone see this picture, and help with the coding it would take to hide the cells and still be able to click on the hyperlinks and open the pages?

Thanks in advance!
 

Attachments

  • excel.JPG
    excel.JPG
    88.1 KB · Views: 8

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Try this code in the ThisWorkbook module:
VBA Code:
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)

    Dim p As Long, targetSheet As String
    
    With Target
        p = InStr(1, .SubAddress, "!")
        If p > 0 Then
            targetSheet = Replace(Left(.SubAddress, p - 1), "'", "")
            Worksheets(targetSheet).Visible = True
            Worksheets(targetSheet).Select
            Worksheets(targetSheet).Range(Mid(.SubAddress, p + 1)).Select
        End If
    End With
    
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,049
Messages
6,122,864
Members
449,097
Latest member
dbomb1414

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