[vba] 엑셀(Excel) 셀 오른쪽 마우스 매뉴

하나를하더라도최선을 2020-03-17 01:42:23 46,585 0 0
출처 : 지식인
잘 사용하지는 않지만 특이하게 코딩되어 기록해둠!!




Function 삭제()
    CommandBars("Cell").Reset
End Function

Function 생성()
    Application.CommandBars("Cell").Reset
    
    With Application.CommandBars("Cell")
        With .Controls.Add(Type:=msoControlButton, before:=1)
            .Enabled = False
            .Caption = "─────────────"
            .Visible = True
        End With
        With .Controls.Add(Type:=msoControlButton, before:=1)
            .Enabled = True
            .Caption = "★ 시트백업"
            .OnAction = "메인.시트백업"
            .Visible = True
        End With
        With .Controls.Add(Type:=msoControlButton, before:=1)
            .Enabled = False
            .Caption = "─────────────"
            .Visible = True
        End With
        With .Controls.Add(Type:=msoControlButton, before:=1)
            .Enabled = True
            .Caption = "★ 화면새로고침이 안될때"
            .OnAction = "메인.기능켜기"
            .Visible = True
        End With
        With .Controls.Add(Type:=msoControlButton, before:=1)
            .Enabled = False
            .Caption = "─────────────"
            .Visible = True
        End With
        With .Controls.Add(Type:=msoControlButton, before:=1)
            .Enabled = True
            .Caption = "★ 평  균"
            .OnAction = "메인.평균"
            .Visible = True
        End With
        With .Controls.Add(Type:=msoControlButton, before:=1)
            .Enabled = False
            .Caption = "─────────────"
            .Visible = True
        End With
        With .Controls.Add(Type:=msoControlButton, before:=1)
            .Enabled = True
            .Caption = "★ 집  계"
            .OnAction = "메인.집계"
            .Visible = True
        End With
    End With
End Function

댓글 0개

첫 번째 댓글을 작성해보세요!