• 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.

Excel Hyper link and Hide sheet

Afarag

Member
dears,

Please i want your help
I want to hyperlink another sheet in the same workbook but want to hide the sheet also.
 
Hi, Afarag!
You want to place in worksheet Sheet1 cell A1 an hyperlink to worksheet Sheet2 cell B2 and hide worksheet Sheet2? If I understood correctly this, hence what for? Otherwise, please elaborate.
Regards!
 
@SirJB7

exactly i have in sheet one more than one hyperlink for more than one other sheet as link for sheet 2 and link for sheet 3 etc...
i want to hide the other sheets

gratefully,
 
@Afarag

Hi, May be the Hyperlink is not properly for the hidden sheets so please place the command button in Sheet1 and use the below code for hide and unhide the sheets

Code:
Private Sub CommandButton1_Click()
'Unhide the active sheet and
'Goto to 'Sheet1'
With ActiveWorkbook.Worksheets("Sheet2")
.Visible = True
' Unhide ActiveSheet If Not 'Sheet1'
If .Name <> ActiveSheet.Name Then
End If
Application.Goto _
Reference:=.Range("A1"), _
Scroll:=True
End With
End Sub

for hide the Sheet2
Code:
Private Sub CommandButton1_Click()
'hide the active sheet and
'return back to 'sheet1'
With ActiveWorkbook.Worksheets("Sheet1")
.Visible = True
' Hide ActiveSheet If Not 'Sheet1'
If .Name <> ActiveSheet.Name Then
ActiveSheet.Visible = False
End If
Application.Goto _
Reference:=.Range("A1"), _
Scroll:=True
End With
End Sub

Hope it's help you other wise please inform

Thanks
 
Hi, Afarag!

Please confirm:
a) How many worksheets do you have?
b) In which ones do you have hyperlinks to others?
c) Which ones do you want to hide?

Otherwise you know the routine. Upload a sample file & co.

Regards!
 
Hi, Sir

my workbook contain 5 sheets, the first sheet call all is the main sheet and i want hide the other
 

Attachments

  • hyperlink.xlsx
    163.9 KB · Views: 6
@Afarag

Hi, Please download the file

i have set my previous codes only for All Tab Buttons rest tabs you can set if any problem please inform

Thanks
 

Attachments

  • hyperlink.xlsm
    171.2 KB · Views: 13
thanks for sharing, i have an inquiry here , how to let the hidden sheets returned back to be hidden if i click on my first sheets or if i have dashboard,
 
@majedix

Welcome to Chandoo.org forum, Glad You Are here

please elaborate some more details what do you want



I mean if i have Sheet1 have hyper link to multiple Sheets ( Sheet1,2,3 etc.. and all of these sheets are hidden like the above example , so once i click on the hyper link it should direct me to the link so the sheet will be active and will remain as its(active in the sheet bar) so, once i move to the sheet1 i need a command that gives sheet1,2,3...ect to returned back hidden.
 
@majedix

i already explain how to hide / unhide the active sheet in my before post

as per your request say your 4 sheets 1 is Master and rest is work sheets
in the Master sheet insert 3 Command Buttons and place the Below mention code for each command button

Code:
Private Sub CommandButton1_Click()
'Unhide the active sheet and'Goto to 'Sheet1'With ActiveWorkbook.Worksheets("Sheet2") ' Replace the Sheet name as your
.Visible = True
' Unhide ActiveSheet If Not 'Sheet1'If .Name <> ActiveSheet.Name Then
End If
Application.Goto _
Reference:=.Range("A1"), _
Scroll:=True
End With
End Sub

now place the command button in each sheet and use the below code for hide the active sheet and return to Master Sheet

Code:
Private Sub CommandButton1_Click()
'hide the active sheet and'return back to 'sheet1'With ActiveWorkbook.Worksheets("Sheet1") ' Replace the Sheet name as your
.Visible = True
' Hide ActiveSheet If Not 'Sheet1'If .Name <> ActiveSheet.Name Then
ActiveSheet.Visible = False
End If
Application.Goto _
Reference:=.Range("A1"), _
Scroll:=True
End With
End Sub

Hope you understand if any problem please come back

Thanks
 
Back
Top