Unhandled exception

Hi, can anyone tell me how to correct this error

An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in system.dll

Additional information: The system cannot find the file specified



Answer this question

Unhandled exception

  • osamaT

    Thanks! I feel silly for asking such a simple qn, but thanks anyway.
  • Keith Henkel

    Its a really simple code but i'm pretty new to this.

    private void Trigger_Click(object sender, System.EventArgs e)
    {
    System.Diagnostics.Process.Start("C:\\EXCEL.exe");
    }


  • mamoismax

    There is no Excel.exe file in C:\ so that's where the error comes from. Try using just excel.exe, without C:\\ and it should work if Excel is installed

    System.Diagnostics.Process.Start("excel.exe");


  • Andrew Buyan

    Without seeing the code where this exception happens it's hard to say. You need to tell us at least the .NET class, method that thrown this exception.
  • Unhandled exception