Private Sub CheckBox1_Change() If CheckBox1.Value = True Then Range("B1").Value = "ON" Range("A1").Locked = True ' Range("A2:A5").Locked = False A2:A5には入力OK ActiveSheet.Protect Else ActiveSheet.Unprotect Range("B1").Value = "OFF" Range("A1").Locked = False End If End Sub |