메인 컨텐츠로 가기

Excel에서 숨겨진 시트에 대한 하이퍼 링크를 따르는 방법은 무엇입니까?

예를 들어, 여러 워크 시트가 포함 된 통합 문서가 있고 첫 번째 마스터 시트에는 다른 시트에 대한 하이퍼 링크가 있으며 이제 첫 번째 시트를 제외한 모든 시트를 숨 깁니다. 이 경우 숨겨진 시트로 연결되는 하이퍼 링크를 사용할 수 없습니다. 그러나 이러한 하이퍼 링크를 어떻게 성공적으로 작동시킬 수 있습니까? 하나의 하이퍼 링크를 클릭하면 다음 스크린 샷과 같이 연결된 숨겨진 시트가 한 번에 열립니다.

숨겨진 시트에 대한 문서 하이퍼 링크 1

하이퍼 링크를 따라 VBA 코드로 숨겨진 시트를 엽니 다.

하이퍼 링크를 따라 숨겨진 시트를 연 다음 VBA 코드로 다시 숨 깁니다.


하이퍼 링크를 따라 VBA 코드로 숨겨진 시트를 엽니 다.

다음 VBA 코드는 상대 하이퍼 링크를 클릭 할 때 숨겨진 워크 시트를 여는 데 도움이 될 수 있습니다. 다음과 같이하십시오.

1. 숨겨진 시트에 대한 하이퍼 링크를 따라갈 시트 탭을 마우스 오른쪽 단추로 클릭 한 다음 코드보기 컨텍스트 메뉴에서 튀어 나온 응용 프로그램 용 Microsoft Visual Basic 창에서 다음 코드를 복사하여 빈 모듈에 붙여 넣으십시오.

VBA 코드 : 하이퍼 링크를 따라 숨겨진 시트를 엽니 다.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Updateby Extendoffice
    Application.ScreenUpdating = False
    On Error Resume Next
    If Target.Column = 1 Then
        Sheets(Target.Value).Visible = xlSheetVisible
        Sheets(Target.Value).Select
    End If
    Application.ScreenUpdating = True
End Sub

숨겨진 시트에 대한 문서 하이퍼 링크 2

주의 사항: 위 코드에서 숫자 1 이번에 If Target.Column = 1 Then 스크립트는 하이퍼 링크가 포함 된 열 번호를 나타냅니다. 필요에 따라 변경하십시오.

2. 그런 다음이 코드 창을 저장하고 닫습니다. 이제 특정 숨겨진 시트로 연결되는 하이퍼 링크를 클릭하면 숨겨진 시트가 한 번에 열립니다.


하이퍼 링크를 따라 숨겨진 시트를 연 다음 VBA 코드로 다시 숨 깁니다.

때로는 하이퍼 링크를 따라 가서 숨겨진 시트를 열어야하고 마스터 시트로 돌아갈 때 열린 시트를 다시 숨겨야합니다. 아래 VBA 코드가 도움이 될 수 있습니다.

1. 숨겨진 시트에 대한 하이퍼 링크를 따라갈 시트 탭을 마우스 오른쪽 단추로 클릭 한 다음 코드보기 컨텍스트 메뉴에서 튀어 나온 응용 프로그램 용 Microsoft Visual Basic 창에서 다음 코드를 복사하여 빈 모듈에 붙여 넣으십시오.

VBA 코드 : 다시 숨길 때 숨겨진 시트를 열려면 하이퍼 링크를 따르십시오.

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
   'Updateby Extendoffice
    Application.ScreenUpdating = False
    Dim strLinkSheet As String
    If InStr(Target.Parent, "!") > 0 Then
        strLinkSheet = Left(Target.Parent, InStr(1, Target.Parent, "!") - 1)
    Else
        strLinkSheet = Target.Parent
    End If
    Sheets(strLinkSheet).Visible = True
    Sheets(strLinkSheet).Select
    Application.ScreenUpdating = True
End Sub

Private Sub Worksheet_Activate()
    On Error Resume Next
    Sheets(ActiveCell.Value2).Visible = False
End Sub

숨겨진 시트에 대한 문서 하이퍼 링크 3

2. 그런 다음 코드 창을 닫고 저장하고 하이퍼 링크를 클릭하면 연결된 숨겨진 시트가 즉시 열리지 만 하이퍼 링크가 포함 된 마스터 시트로 돌아 가면 열린 시트가 자동으로 다시 숨겨집니다.

주의 사항:이 코드는 하이퍼 링크 텍스트와 일치하는 시트 이름에만 적용됩니다.


데모 : 하이퍼 링크를 따라 VBA 코드로 숨겨진 시트 열기

Excel 용 Kutools: 300 개 이상의 편리한 Excel 추가 기능으로 30 일 동안 제한없이 무료로 사용해 볼 수 있습니다. 지금 다운로드 및 무료 평가판!

최고의 사무 생산성 도구

🤖 Kutools AI 보좌관: 다음을 기반으로 데이터 분석을 혁신합니다. 지능형 실행   |  코드 생성  |  사용자 정의 수식 만들기  |  데이터 분석 및 차트 생성  |  Kutools 기능 호출...
인기 기능: 중복 항목 찾기, 강조 표시 또는 식별   |  빈 행 삭제   |  데이터 손실 없이 열이나 셀 결합   |   수식없이 반올림 ...
슈퍼 조회: 다중 기준 VLookup    다중 값 VLookup  |   여러 시트에 걸친 VLookup   |   퍼지 조회 ....
고급 드롭다운 목록: 드롭다운 목록을 빠르게 생성   |  종속 드롭다운 목록   |  다중 선택 드롭 다운 목록 ....
열 관리자: 특정 개수의 열 추가  |  열 이동  |  Toggle 숨겨진 열의 가시성 상태  |  범위 및 열 비교 ...
특색 지어진 특징: 그리드 포커스   |  디자인보기   |   큰 수식 바    통합 문서 및 시트 관리자   |  리소스 라이브러리 (자동 텍스트)   |  날짜 선택기   |  워크 시트 결합   |  셀 암호화/해독    목록으로 이메일 보내기   |  슈퍼 필터   |   특수 필터 (굵게/기울임꼴/취소선 필터링...) ...
상위 15개 도구 세트12 본문 도구 (텍스트 추가, 문자 제거,...)   |   50+ 거래차트 유형 (Gantt 차트,...)   |   40+ 실용 방식 (생일을 기준으로 나이 계산,...)   |   19 삽입 도구 (QR 코드 삽입, 경로에서 그림 삽입,...)   |   12 매출 상승 도구 (숫자를 단어로, 환율,...)   |   7 병합 및 분할 도구 (고급 결합 행, 셀 분할,...)   |   ... 그리고 더

Excel용 Kutools로 Excel 기술을 강화하고 이전과는 전혀 다른 효율성을 경험해 보세요. Excel용 Kutools는 생산성을 높이고 시간을 절약하기 위해 300개 이상의 고급 기능을 제공합니다.  가장 필요한 기능을 얻으려면 여기를 클릭하십시오...

상품 설명


Office Tab은 Office에 탭 인터페이스를 제공하여 작업을 훨씬 쉽게 만듭니다.

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
Comments (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Not sure if I will get a response to this one, but when I click the any of my hyperlinks I get a "reference isn't valid" error.
Everything still works, I just need to click ok to continue.
Does anyone have an idea what causes this error for this code?
Thank you,
This comment was minimized by the moderator on the site
I have created many wordbook and I want to index those in one page.

N.B: My point is I want to hide all the sheets, the sheets will linked with setting picture to main page. By clicking the picture linked sheet will be shown and when I come back to the main sheet the un-hide sheet will be hidden again
This comment was minimized by the moderator on the site
I would like to use this code but only want it to apply to column A. I have other web address links in other cells which cause a problem when running this code.
This comment was minimized by the moderator on the site
My hyperlink "text" is number only, and it doesn't work...
This comment was minimized by the moderator on the site
I'm using the code on two different sheets. It works for one of about 40 hyperlinks on one sheet and it opens two of about 10 hyperlinks one she second, the sheets on the second which do open do go back into hiding when I return to the sheet. The error I get when it will not open a sheet is Run-time error"9": script out of range and the code it points me to - Sheets(strLinkSheet).Visible = True Any ideas as to what change is needed make the code work on all of the sheets? Thank you in advance.
This comment was minimized by the moderator on the site
I have used this code on two different sheets in my workbook, and in both cases it works great, except for the first hyperlink on each page. I get "Subscript out of range error" and the debugger points to the "Sheets(strLinkSheet).Visible = True" right after the "end if". Anyone else see this error? It is only on the first link on the page. (my hyperlinks are in column A, and start in row 2)
This comment was minimized by the moderator on the site
[quote]I have used this code on two different sheets in my workbook, and in both cases it works great, except for the first hyperlink on each page. I get "Subscript out of range error" and the debugger points to the "Sheets(strLinkSheet).Visible = True" right after the "end if". Anyone else see this error? It is only on the first link on the page. (my hyperlinks are in column A, and start in row 2)By HelzBelz[/quote] Sheet names can't have space like "Sheet 1". I fixed my sheet names to "Sheet1" and the error stopped.
This comment was minimized by the moderator on the site
I have a sheet that is hidden that contains a hyperlink. I would like to be able go to the hidden sheet and have it close when I go back to the original sheet. I used the code but it does not work.
This comment was minimized by the moderator on the site
I am trying to hide a sheet that has a hyperlink. I would like to be able to click on the sheet go to the hyperlink sheet and then click back to the sheet and close the hidden sheet. I have tried your instructions but it does not work. Not sure what I am doing wrong.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations