20260515指摘対応6
This commit is contained in:
@@ -47,7 +47,8 @@ Private Sub Worksheet_Change(ByVal Target As Range)
|
||||
End Sub
|
||||
|
||||
Private Sub Validate(ws As Worksheet, ByVal rowNum As Long, ByVal lastDataRow As Long)
|
||||
|
||||
On Error GoTo ErrHandler
|
||||
|
||||
Dim sheetConfDict As Object: Set sheetConfDict = GetSheetConfig()
|
||||
Dim sheetConf As Object: Set sheetConf = sheetConfDict(ws.CodeName)
|
||||
|
||||
@@ -129,15 +130,18 @@ Private Sub Validate(ws As Worksheet, ByVal rowNum As Long, ByVal lastDataRow As
|
||||
|
||||
' Validation passed - clear error
|
||||
ws.Cells(rowNum, errorCol).ClearContents
|
||||
Exit Sub
|
||||
|
||||
ErrHandler:
|
||||
lastErrorMsg = Err.Description
|
||||
End Sub
|
||||
|
||||
' obtain z1 master data, and update column E
|
||||
Private Sub Refresh(ws As Worksheet, ByVal startRow As Long, ByVal lastDataRow As Long)
|
||||
Dim z1Cache As Object: Set z1Cache = GetCache("Z1")
|
||||
If z1Cache Is Nothing Then Exit Sub
|
||||
|
||||
Application.EnableEvents = False
|
||||
On Error GoTo Finally
|
||||
On Error GoTo ErrorHandler
|
||||
|
||||
Dim r As Long
|
||||
For r = startRow To lastDataRow
|
||||
@@ -148,8 +152,11 @@ Private Sub Refresh(ws As Worksheet, ByVal startRow As Long, ByVal lastDataRow A
|
||||
End If
|
||||
Next r
|
||||
|
||||
Finally:
|
||||
Exit Sub
|
||||
|
||||
ErrorHandler:
|
||||
Application.EnableEvents = True
|
||||
Err.Raise ERR_CACHE_NOT_FOUND, "M1.Refresh", "Failed to refresh M1: " & Err.Description
|
||||
End Sub
|
||||
|
||||
Private Sub ValidateWarn(ws As Worksheet, ByVal lastDataRow As Long)
|
||||
|
||||
Reference in New Issue
Block a user