' ログの作成
Dim msgArray As Object
' ログメッセージ定義 必ず実行すること
Public Function setMsgArray()
    Set msgArray = CreateObject("Scripting.Dictionary")
    
    msgArray.Add "ERROR001", "{0}の処理に失敗しました。{1}を{2}してください。"
    msgArray.Add "ERROR002", "{0}の処理に失敗しました。{1}が間違えていませんか。"
End Function
Public Function outputMsgBox(key As String, placeholderArray() As Variant)
    Dim msg As String
    Dim cnt As Integer
    
    msg = key & vbCrLf & _
          msgArray.Item(key)
          
    For cnt = LBound(placeholderArray) To UBound(placeholderArray)
        msg = Replace(msg, "{" & cnt & "}", placeholderArray(cnt))
    Next
    
    MsgBox msg
End Function
' 使い方
Sub Test()
    Call setMsgArray
    
    Dim placeholderArray() As Variant
    
    placeholderArray = Array("データ更新", "値1", "数値に")
    Call outputMsgBox("ERROR001", placeholderArray)
End Sub