20260515指摘対応
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user