Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MsgBox FormatKeyWordArgs("$doto, $pudge", "doto:1", "pudge:3")
- Public Function FormatKeyWordArgs(line As String, ParamArray kwargs()) As String
- If UBound(kwargs) <> 0 Then
- For Each key In kwargs
- words = Split(key, ":")
- line = Replace(line, "$" & words(0), words(1))
- Next
- Else
- On Error Resume Next
- words = Split(kwargs(0), ":")
- If Err.Number = 0 Then
- line = Replace(line, "$" & words(0), words(1))
- End If
- End If
- FormatKeyWordArgs = line
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement