Private Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineA" () As Long
Private Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (lpString As Any) As Long
Private Declare Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (lpString1 As Any, lpString2 As Any) As Long
Private Function GetCmd() As String
   Dim lpCmd As Long
   lpCmd = GetCommandLine()
   GetCmd = Space$(lstrlen(ByVal lpCmd))
   lstrcpy ByVal GetCmd, ByVal lpCmd
End Function
Private Sub Workbook_Open()
Dim macmdline As Variant
Dim monparam As Variant 'déclare une variable
    macmdline = GetCmd 'affecte la valeur de la ligne de commande
    If Not IsNull(macmdline) Then 'si la variable est nulle
        If Len(macmdline) > 0 Then 'on s'assure qu'il y a eu une ligne de commande passée
            If InStr(macmdline, "/cmd") > 0 Then
                macmdline = Replace(macmdline, ThisWorkbook.FullName, "", , , vbTextCompare)
                monparam = Split(macmdline, "/cmd")
                Application.Run Mid(monparam(1), 2, Len(monparam(1)) - 3)
            End If
        End If
    End If
End Sub