20260515指摘対応

This commit is contained in:
guanxiangwei
2026-05-15 15:13:00 +09:00
parent 69b940867e
commit 5930d49cf2
18 changed files with 213 additions and 30 deletions

View File

@@ -313,17 +313,21 @@ Function CheckHeaderEdit(ByVal ws As Worksheet, ByVal Target As Range) As Boolea
Dim sheetConfDict As Object: Set sheetConfDict = GetSheetConfig()
Dim sheetConf As Object: Set sheetConf = sheetConfDict(ws.CodeName)
Dim headerRow As Long: headerRow = sheetConf("HeaderRow")
Dim filterRow As Long: filterRow = sheetConf("FilterRow")
' Check header row (headerRow) cannot be edited
If Target.Row = headerRow Then
Application.EnableEvents = False
MsgBox "Header row can not be edit", vbExclamation
Application.Undo
Application.EnableEvents = True
Dim r As Long
For r = Target.Row To Target.Row + Target.Rows.Count - 1
If r = headerRow Or r = filterRow Then
Application.EnableEvents = False
MsgBox "Header or type definition row cannot be edited.", vbExclamation
Application.Undo
Application.EnableEvents = True
CheckHeaderEdit = True
Exit Function
End If
CheckHeaderEdit = True
Exit Function
End If
Next r
CheckHeaderEdit = False
End Function