In Beta2 we shipped with an unforunate bug that will affect VB.NET users.
If you write code like this in a worksheet project item, it will fail with a COMException at runtime:
The problem is that when you wrote the code Range(“A1”) you are actually omitting a second optional parameter that the Range property takes. In VSTO Beta2, we are passing that second omitted optional parameter incorrectly to Excel. This issue potentially affects any the following parameterized properties on objects in the Microsoft.Office.Tools.Excel namespace that have optional parameters:
There are three workarounds. One–specify all the parameters:
Workaround two is useful if you still don’t want to specify an optional parameter–pass System.Type.Missing to the optional parameter:
Workaround three is to call the “InnerObject” property which effectively “unwraps” a VSTO object to give you the underlying PIA: