diff --git a/src/sh/tuk/module/Common_Functions.bas b/src/sh/tuk/module/Common_Functions.bas index 11b178f..5e5c9df 100644 --- a/src/sh/tuk/module/Common_Functions.bas +++ b/src/sh/tuk/module/Common_Functions.bas @@ -329,6 +329,22 @@ Function CheckHeaderEdit(ByVal ws As Worksheet, ByVal Target As Range) As Boolea End If Next r + ' filterRow color is not equals to filterRow + 1 + If Target.Row = filterRow + 1 Then + Dim firstCell As Range: Set firstCell = Target.Cells(1, 1) + Dim colIndex As Long: colIndex = firstCell.Column + Dim refCell As Range: Set refCell = ws.Cells(filterRow, colIndex) + If firstCell.Interior.Color = refCell.Interior.Color Then + Application.EnableEvents = False + MsgBox "Cannot autoFill from filterRow.", vbExclamation + Application.Undo + Application.EnableEvents = True + + CheckHeaderEdit = True + Exit Function + End If + End If + CheckHeaderEdit = False End Function diff --git a/通勤手当テンプレート20260514.xlsm b/通勤手当テンプレート20260514.xlsm index 35511ea..f17c879 100644 Binary files a/通勤手当テンプレート20260514.xlsm and b/通勤手当テンプレート20260514.xlsm differ