나눔터  
  HOME > 나눔터 > 묻고답하기 > 엑셀
엑셀
엑셀에 대한 질문과 답변을 올려주세요. 단, 취지에 맞지 않는 글은 운영자가 삭제합니다.
 "000 님, 도와주세요", "부탁 드립니다.", "급합니다!" 등과 같이 막연한 제목을 달지 말아주세요.
[필독] 빠르고 정확한 답변을 얻는 16가지 Tip !
[필독] 저작권법 개정에 따른 이용안내

작성자:  

 update (gskim10)

추천:  0
파일:     office Ribbon 오류.txt (2.5KB) 조회:  175
제목:   해당시트에 맞는 메뉴 만들기
     
  * 답변하시는 분들께 도움이 되도록 자신의 환경을 아래 항목 옆에 기재해 주세요.

 - 엑셀 버전(95,97,2000,xp,2003,2007):

* 아래줄에 질문을 작성하세요 >>
1. 아래와 같이 하면 추가메뉴가 생기고 전체가 다 나와서 해당시트에 해당하
   는 메뉴만 나타내고 싶은데요..
   방법이 없겠습니까 ?
   부탁 드립니다.
2. office Ribbon 메뉴를 사용할려고 하니 실행에러나 나는데요..
   혹시나 어디가 문제 인지알수 있을까요 ?

Sub dhMakeMenu()
Dim c As CommandBarControl
Dim i As Integer
    With Application.CommandBars(1)
        i = .Controls.Count

        Set c = .FindControl(Type:=msoControlPopup, Tag:=strN)
        If c Is Nothing Then

            Set c = .Controls.Add(Type:=msoControlPopup, before:=i)
            With c
                .Caption = strN & "(&S)"
                .Tag = strN
                

               With .Controls.Add(Type:=msoControlPopup)
                    .Caption = "입고 등록하기"
                    
                  With .Controls.Add(Type:=msoControlButton)
                       .Caption = "입고 등록"
                       .OnAction = "입고등록_insert"
                  End With
                  With .Controls.Add(Type:=msoControlButton)
                       .Caption = "수식적용"
                       .OnAction = "입고_수식"
                  End With
                  With .Controls.Add(Type:=msoControlButton)
                       .Caption = "입고 등록 대기"
                       .OnAction = "입고등록_초기화"
                  End With
                End With
                
                
            With .Controls.Add(Type:=msoControlButton)
            End With
                
                               
            With .Controls.Add(Type:=msoControlPopup)
                 .Caption = "입고 수정하기"
                 
                  With .Controls.Add(Type:=msoControlButton)
                       .Caption = "조 회 하 기"
                       .OnAction = "입고_Insert_Search"
                  End With
                  
                  With .Controls.Add(Type:=msoControlButton)
                  End With
                    
                  With .Controls.Add(Type:=msoControlButton)
                       .Caption = "입고정보 수정하기"
                       .OnAction = "입고등록_Insert_Update"
                  End With

                  With .Controls.Add(Type:=msoControlButton)
                       .Caption = "입고정보 삭제하기"
                       .OnAction = "입고_삭제"
                  End With
            End With
                
                With .Controls.Add(Type:=msoControlButton)
                .Caption = "-----------------------"
                End With
                    
                  With .Controls.Add(Type:=msoControlPopup)
                       .Caption = "사급 등록하기"
                  With .Controls.Add(Type:=msoControlButton)
                       .Caption = "사급 등록"
                       .OnAction = "조회확인"
                  End With
                    
                  With .Controls.Add(Type:=msoControlButton)
                       .Caption = "사급 등록 대기"
                       .OnAction = "사급_등록_초기화"
                  End With
              End With
              
              With .Controls.Add(Type:=msoControlButton)
              End With
                                               
                With .Controls.Add(Type:=msoControlPopup)
                     .Caption = "사급 수정하기"
                  
                  With .Controls.Add(Type:=msoControlButton)
                       .Caption = "조 회 하 기"
                       .OnAction = "사급_입출고_Search"
                  End With

                  With .Controls.Add(Type:=msoControlButton)
                  End With
                    
                                      
                  With .Controls.Add(Type:=msoControlButton)
                       .Caption = "사급 수정하기"
                       .OnAction = "사급_Insert_Update"
                  End With

                  With .Controls.Add(Type:=msoControlButton)
                       .Caption = "사급 삭제하기"
                       .OnAction = "사급_Delete"
                  End With
            End With
                  

'     End With
'     End With
     End With
     
     
     End If
     
    End With
Set c = Nothing
End Sub
 
[불량 게시물 신고]  
        
  

작성일 : 2024-07-07(18:50)
최종수정일 : 2024-07-07(18:50)