To call a Windows Form application (*.exe) with arguments in VBA, you use the Shell() function.

Shell “C:\Dev\SampleWinFormWithArgs.exe arg1”, vbNormalFocus

 

Inside the Windows Form application, you get the command line arguments using Environment.GetCommandLineArgs().

string[] args = Environment.GetCommandLineArgs(); // you can call GetCommandLineArgs() anytime, anywhere foreach(string arg in args) { // do stuff // note that the first argument string is the application pathname }