通勤認定エクセルツール対応14
This commit is contained in:
@@ -1,8 +1,23 @@
|
||||
Attribute VB_Name = "Common_Button"
|
||||
Option Explicit
|
||||
|
||||
' --- Public Variables ---
|
||||
Public lastErrorMsg As String
|
||||
' --- Private Variables ---
|
||||
Private m_LastErrorMsg As String
|
||||
|
||||
' ============================================================
|
||||
' Get/Set last error message
|
||||
' ============================================================
|
||||
Public Sub SetLastErrorMsg(msg As String)
|
||||
m_LastErrorMsg = msg
|
||||
End Sub
|
||||
|
||||
Public Function GetLastErrorMsg() As String
|
||||
GetLastErrorMsg = m_LastErrorMsg
|
||||
End Function
|
||||
|
||||
Public Sub ClearLastErrorMsg()
|
||||
m_LastErrorMsg = ""
|
||||
End Sub
|
||||
|
||||
' ============================================================
|
||||
' Module Name: Common_Button
|
||||
@@ -67,6 +82,7 @@ Sub RefreshCache_Button()
|
||||
Exit Sub
|
||||
|
||||
ErrorHandler:
|
||||
Debug.Print "sheetName = " & sheetName
|
||||
HandleError "RefreshCache_Button"
|
||||
End Sub
|
||||
|
||||
@@ -373,10 +389,10 @@ Public Function RunValidationSilent(ws As Worksheet) As Long
|
||||
Dim r As Long
|
||||
Dim hasError As Boolean: hasError = False
|
||||
For r = startRow To lastDataRow
|
||||
lastErrorMsg = ""
|
||||
Application.Run validate, ws, r, lastDataRow
|
||||
If lastErrorMsg <> "" Then
|
||||
Err.Raise ERR_VALIDATION_FAILED, "RunValidationSilent", lastErrorMsg
|
||||
SetLastErrorMsg ""
|
||||
Application.Run validate, ws, r, lastDataRow
|
||||
If GetLastErrorMsg() <> "" Then
|
||||
Err.Raise ERR_VALIDATION_FAILED, "RunValidationSilent", GetLastErrorMsg()
|
||||
End If
|
||||
Dim errorMessage As String: errorMessage = Trim(ws.Cells(r, errorCol).Value)
|
||||
Dim errorCode As String: errorCode = GetCode(errorMessage)
|
||||
|
||||
Reference in New Issue
Block a user