最後のパラメータ名の前に、キーワード ByVal ParamArray を指定する。
http://msdn.microsoft.com/ja-jp/library/9z7h91e4(VS.80).aspx
UBound 関数:使用できる添字の最大値を返す。
Module Module1
Public Sub TestFunction(ByVal Arg1 As String, ByVal ParamArray OmissibleArgument() As String)
Dim str As String = ""
For idx As Integer = 0 To UBound(OmissibleArgument, 1)
str += OmissibleArgument(idx)
Next idx
Console.WriteLine(Arg1 & "=>" & str)
End Sub
Sub Main()
TestFunction("引数1個", "A") '引数1個=>A
TestFunction("引数5個", "A", "B", "C", "D", "E") '引数5個=>ABCDE
TestFunction("引数なし") '引数なし=>
End Sub
End Module