' Listing 3. Code for the GetArguments Function Function GetArguments() As Variant Dim C As String, CmdLine As String, CmdLnLen As Integer Dim InArgName As Boolean, InArgData As Boolean, Dim i As Integer Dim NumArgs As Integer, ArgArray(50, 2) NumArgs = -1 InArgData = False InArgName = False CmdLine = Trim(Command()) CmdLnLen = Len(CmdLine) For i = 1 To CmdLnLen C = Mid(CmdLine, i, 1) Select Case C Case "/", "\", "-": InArgData = False InArgName = True NumArgs = NumArgs + 1 Case "=": InArgData = True InArgName = False Case Else If C > "" And C <> " " Then If InArgName Then ArgArray(NumArgs, 0) = ArgArray(NumArgs, 0) & LCase(C) End If If InArgData Then ArgArray(NumArgs, 1) = ArgArray(NumArgs, 1) & LCase(C) End If End If End Select Next i GetArguments = ArgArray() End Function