| 
    
     |  | ▼kamike さん: 
 >行挿入;行削除禁止の方法がありましたら
 
 その昔教わったもので、最近ではとんと使ってないのですが、
 よろしければ。
 
 'Step1.WorkBookモジュールに以下のコードを記述
 'Step2.Workbook_Open を実行します。
 
 '--------------------------------------------------------------
 Option Explicit
 
 Private WithEvents menuInsRow As CommandBarButton 'ID 296
 Private WithEvents menuDelRow As CommandBarButton 'ID 293
 
 Private Sub Workbook_Open()
 With Application.CommandBars("Worksheet Menu Bar")
 Set menuInsRow = .FindControl(ID:=296)
 Set menuDelRow = .FindControl(ID:=293)
 End With
 End Sub
 
 Private Sub menuInsRow_Click(ByVal Ctrl As Office.CommandBarButton, _
 Cancel As Boolean)
 MsgBox "行挿入は禁止されています "
 Cancel = True
 End Sub
 
 Private Sub menuDelRow_Click(ByVal Ctrl As Office.CommandBarButton, _
 Cancel As Boolean)
 MsgBox "行削除は禁止されています "
 Cancel = True
 End Sub
 
 |  |