• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA CODE - Link to hidden sheets

Jet Fusion

Member
Hi all,

I have a workbook that has Icons with hyperlinks to hidden sheets and then hides them once you go back to the main sheet (sheet 1).

My issue is when i click on normal text hyperlink it works (testing code) but when I click on the icons the hyperlink does not work. When I unhide the sheets and click on the sheet 1 they go to the sheet but once they are hidden and I try to access them again from sheet 1 they don't open the hidden sheets.

I have the code i'm using in the attached file.

Thanks :)
 

Attachments

  • VBA Hypl Icon.xlsm
    49.8 KB · Views: 9
Hi Jet Fusion,
try removing the hyperlink from the icon and using a normal macro, see attached file:
Code:
Sub Graphic6_Click()
Sheets(2).Visible = xlSheetVisible
Sheets(2).Select
End Sub

Sub Graphic4_Click()
Sheets(3).Visible = xlSheetVisible
Sheets(3).Select
End Sub
 

Attachments

  • VBA Hypl IconKeet.xlsm
    51.1 KB · Views: 11
@Keetoowah thanks that works, the only think is that would you have to then for each icon/picture add it to the code, so if you had 10 in total you would do it for each one?
 
Hi Jet Fusion,:)

thanks for the feedback. If you have multiple sheets you need to repeat the same code for each image, changing the number in brackets that represents the sheet index.
 
Back
Top