Firstly, a using statement such as
using System;
is not executable, so the code never "gets to" execute it.
The error message is saying that something failed in a constructor - probably the
frmArchiveDataSheets
constructor - but it doesn't say what.
The error message is is only part of what you need: you need the whole Exception object to start working out what is happening. So begin by changing your code so you can access the error details:
try
{
...
}
catch (Exception ex)
{
...
}
Now run your code in the debugger and put a breakpoint on the first line in the catch block.
When the breakpoint hits, look at
ex
and it'll give you a lot of information, including an
InnerException
which gives you more detail - this is often something like
Object reference not set to an instance of an object
and the information as to where it happened.
So start there: look at the error message, and at the code that generated the error, and break point that. Run your code again in the debugger, and look at what might have caused the inner exception.
Sorry, but we can't do that for you!