L
LegeDoos
Hi there,
I'm trying to pass parameters to excel, so I can use them in a macro I
wrote.
I found the following on the internet:
Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineA" ()
As String
Sub Test()
Dim X As String
X = GetCommandLine
MsgBox X
End Sub
When I call
excel.exe c:\test.xls parameter
I get the result
"c:\progra~1\micros~2\office11\excel.exe" c:\test.xls
when I call Test. This doesn't work.
Is it possible to read the parameter in a macro and how can I do that?
I'm trying to pass parameters to excel, so I can use them in a macro I
wrote.
I found the following on the internet:
Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineA" ()
As String
Sub Test()
Dim X As String
X = GetCommandLine
MsgBox X
End Sub
When I call
excel.exe c:\test.xls parameter
I get the result
"c:\progra~1\micros~2\office11\excel.exe" c:\test.xls
when I call Test. This doesn't work.
Is it possible to read the parameter in a macro and how can I do that?