20260515指摘対応9

This commit is contained in:
guanxiangwei
2026-05-21 16:40:02 +09:00
parent 0a633d711c
commit 56ca7ed8c5
14 changed files with 151 additions and 4 deletions

View File

@@ -368,12 +368,12 @@ Function CheckHeaderEdit(ByVal ws As Worksheet, ByVal Target As Range) As Boolea
Dim sheetConf As Object: Set sheetConf = sheetConfDict(ws.CodeName)
Dim filterRow As Long: filterRow = sheetConf("FilterRow")
' Check header row (headerRow) cannot be edited
' Check rows 1 to filterRow cannot be edited
Dim r As Long
For r = Target.Row To Target.Row + Target.Rows.Count - 1
If r = 1 Or r = filterRow Then
If r >= 1 And r <= filterRow Then
Application.EnableEvents = False
MsgBox "Header or type definition row cannot be edited.", vbExclamation
MsgBox "Cannot edit rows 1 to " & filterRow & ".", vbExclamation
Application.Undo
Application.EnableEvents = True