21.PC_1




● 작업)VBA로 엑셀 리본메뉴에 사용자정의 탭,버튼 추가하기


  • 링크

  • 첨부

  • 컨텐츠 정보


    본문

    ● 작업)VBA로 엑셀 리본메뉴에 사용자정의 탭,버튼 추가하기

    https://xlworks.net/custom-tab-button-add/


    c:\Users\shimss\Downloads\VBA로_리본메뉴에_탭_버튼추가하기.zip

    3232235521_1666488061.521.png


    1) 파일하나  만들어 alt + f11 하여 아래내용 모듈에 추가 저장


    Sub loadCustomTabOfRibbon(ribbon As IRibbonUI)
     
    '//엑셀이 시작되면 사용자정의 탭을 활성화시킨다.
    On Error Resume Next
    ribbon.ActivateTab "myTabId001"
     
    End Sub
    Sub previewFromRibbon(control As IRibbonControl)
    '//리본의 사용자정의탭에 추가한 버튼을 클릭하면 실행되는 콜백프로시저
     
    MsgBox "미리보기가 클릭되었습니다!"
     
    End Sub
     
    Sub aboutFromRibbon(control As IRibbonControl)
    '//리본의 사용자정의탭에 추가한 버튼을 클릭하면 실행되는 콜백프로시저
     
    MsgBox "확인! 버튼이 클릭되었습니다!"
     

    End Sub

    2) 파일저장

     3232235521_1666488623.0109.png



    3) 파일 변경

    d:\sw\excel_매크로_리본에탭추가\vba_모듈추가리본메뉴작업.xlsm

    을 

    d:\sw\excel_매크로_리본에탭추가\vba_모듈추가리본메뉴작업.xlsm.zip

    이름  확장자 변경

    zip파일 확인



    4)d:\sw\excel_매크로_리본에탭추가\customUI.xml 파일 생성

     3232235521_1666488819.6454.png

    파일 저장해놓습니다


    d:\sw\excel_매크로_리본에탭추가\vba_모듈추가리본메뉴작업.xlsm.zip\_rels\.rels


    3232235521_1666495816.2651.png


    작업 내용

    d:\sw\excel_매크로_리본에탭추가\vba_모듈추가리본메뉴작업.xlsm

    을 불러옵니다

    d:\sw\excel_매크로_리본에탭추가\.rels
    d:\sw\excel_매크로_리본에탭추가\vba_모듈추가리본메뉴작업.xlsm.zip\_rels\.rels

    복사



    d:\sw\excel_매크로_리본에탭추가\vba_모듈추가리본메뉴작업.xlsm.zip\_rels\.rels

    을 열어 보면

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

    <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>



    여기에

    <Relationship Id="myRibbonCustomTabId001" Type="http://schemas.microsoft.com/office/2006/relationships/ui/extensibility" Target="customUI/customUI.xml"/>

    </Relationships>의 앞단에 추가

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

    <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/><Relationship Id="myRibbonCustomTabId001" Type="http://schemas.microsoft.com/office/2006/relationships/ui/extensibility" Target="customUI/customUI.xml"/>
    </Relationships>

    3232235521_1666495859.1141.png


    3232235521_1666496030.197.png


    d:\sw\excel_매크로_리본에탭추가\vba_모듈추가리본메뉴작업.xlsm.zip

    d:\sw\excel_매크로_리본에탭추가\vba_모듈추가리본메뉴작업.xlsm

    로 변경

    불러오기 합니다

    3232235521_1666496297.5449.png



    .end


    뷰PDF add1,add2



    관련자료

    댓글 1


    전체 1,131 / 5 페이지
    전체 1,131 / 5 페이지



    ♥간단_메모글♥


    최근글


    새댓글



    PHP 안에 HTML ☞ 홈페이지 화면갱신 시간은 ♨
    ▶ 2024-05-09 16:30:37

    오늘의 홈 현황


    • 현재 접속자♨ 326 명
    • 오늘 가입자※ 2 명
    • 어제 가입자※ 4 명
    • 주간 가입자※ 12 명
    • 오늘 방문자 1,451 명
    • 어제 방문자 1,900 명
    • 최대 방문자 13,042 명
    • 전체 방문자 4,313,015 명
    • 전체 게시물※ 8,559 개
    • 전체 댓글수※ 24,581 개
    • 전체 회원수 10,958 명

    QR코드


    ☞ QR코드 스캔은 kakao앱 자체 QR코드

    알림 0








    최신글↑