• 쇼핑몰
  • 커뮤니티
  • 북마크

vb6.0/vba

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

하나를하더라도최선을
2020.03.17 01:42 53 0

본문



출처 : 지식인
잘 사용하지는 않지만 특이하게 코딩되어 기록해둠!!

12508c24b2dbed2871319c85b857d417_1584376932_8616.png


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

등록된 댓글이 없습니다.