diff --git a/src/module/Common_Button.bas b/src/module/Common_Button.bas index 32a6f07..a077022 100644 --- a/src/module/Common_Button.bas +++ b/src/module/Common_Button.bas @@ -281,7 +281,10 @@ private Function RunValidationSilent(ws As Worksheet, Optional ByRef errorCountO errorCountOut = 0 For r = startRow To lastDataRow Application.Run validate, ws, r, lastDataRow - If Trim(ws.Cells(r, errorCol).Value) <> "" Then + Dim errorMessage As String : errorMessage = Trim(ws.Cells(r, errorCol).Value) + Dim errorCode As String: errorCode = GetCode(errorMessage) + If errorCode <> "W001" And errorCode <> "" Then + MsgBox errorMessage errorCountOut = errorCountOut + 1 End If Next r diff --git a/src/module/Common_Functions.bas b/src/module/Common_Functions.bas index eea7803..b56b293 100644 --- a/src/module/Common_Functions.bas +++ b/src/module/Common_Functions.bas @@ -324,7 +324,7 @@ Function GetErrorMsg(ByVal errorCode As String, Optional ByVal param As String = Dim errorList As Object: Set errorList = GetErrorList() Dim errorMessage As String If errorList.Exists(errorCode) Then - errorMessage = Replace(errorList(errorCode)(0), "{0}", param) + errorMessage = MakeSelect(errorCode, Replace(errorList(errorCode)(0), "{0}", param)) End If GetErrorMsg = errorMessage End Function diff --git a/src/sheet/M1.cls b/src/sheet/M1.cls index 075ff7f..23371d1 100644 --- a/src/sheet/M1.cls +++ b/src/sheet/M1.cls @@ -155,7 +155,7 @@ Private Sub Validate(ws As Worksheet, ByVal rowNum As Long, ByVal lastDataRow As ' Check if M2 uses this M1 kukan code Dim m2Cache As Object: Set m2Cache = GetM2Cache() If Not m2Cache.Exists(cValue) Then - ws.Cells(rowNum, errorCol).Value = "The section details are not registered for the corresponding section" + ws.Cells(rowNum, errorCol).Value = GetErrorMsg("W001", cValue) ws.Range("C" & rowNum).Interior.Color = RGB(255, 128, 0) Exit Sub End If diff --git a/通勤手当テンプレート_案.xlsm b/通勤手当テンプレート_案.xlsm index f3ac84e..af43372 100644 Binary files a/通勤手当テンプレート_案.xlsm and b/通勤手当テンプレート_案.xlsm differ