More than 1 year has passed since last update.
以前仕事中によく使われていた共通メソッド
'*******************************************************
'MessageFormatの使い方の例 ↓
' Dim args(2) As String
' args(0) = "test1"
' args(1) = "test2"
' args(2) = "test3"
' MsgBox (MessageFormat("this sheet{0},{1},{2} has done.", args))
'*******************************************************
Function MessageFormat(targetMsg As String, args() As String) As String
Dim index As Integer
For index = 0 To UBound(args)
targetMsg = Replace(targetMsg, "{" & index & "}", args(index))
Next index
MessageFormat = targetMsg
End Function
Why not register and get more from Qiita?
- We will deliver articles that match you
By following users and tags, you can catch up information on technical fields that you are interested in as a whole
- you can read useful information later efficiently
By "stocking" the articles you like, you can search right away
Sign upLogin