VB Code:
Option Explicit
Private Sub Form_Load()
Dim myCommand As String, myMsg As String
myCommand = "Blah blah blah RndNum(10,90) sadjoasidjoiasdja"
If (InStr(myCommand, "RndNum") <> 0) Then
Dim param() As String
Dim commandName As String, tempStr As String
tempStr = Mid(myCommand, InStr(myCommand, "RndNum"), InStr(InStr(myCommand, "RndNum"), myCommand, ")") - InStr(myCommand, "RndNum") + 1)
commandName = Left(tempStr, InStr(tempStr, "(") - 1)
param = Split(Replace(Replace(Replace(tempStr, commandName, ""), "(", ""), ")", ""), ",")
myMsg = "Command Name : " & vbTab & commandName & vbCrLf & _
"Parameter 1 : " & vbTab & param(0) & vbCrLf & _
"Parameter 2 : " & vbTab & param(1)
Else
myMsg = "No command found ..."
End If
MsgBox myMsg
End Sub