VBA Excel Automation in VB.Net 
Author Message
 VBA Excel Automation in VB.Net

I'm getting  a 'System.Runtime.InteropServices.COMException' occurred in
mscorlib.dll Additional information: Exception from HRESULT: 0x800A03EC in
.NET from the following VBA statement:

PivotCache.CommandText = SQL

SQL is basically a SQL statement in a string.  The property is expecting an
array, but eveytime I try to set it with an array or object, I get the
exception error.  However, if I take the original property value

Dim arArray as Object
arArray = PivotCache.CommandText

I'm able to parse through arArray and get the values.  If I try and do
PivotCache.CommandText = arArray (no changes to arArray) the Exception is
thrown.  Why is that???

-Confused....



Tue, 11 Jan 2005 06:05:10 GMT  
 VBA Excel Automation in VB.Net


I'm getting  a 'System.Runtime.InteropServices.COMException' occurred in
mscorlib.dll Additional information: Exception from HRESULT: 0x800A03EC in
.NET from the following VBA statement:

PivotCache.CommandText = SQL

SQL is basically a SQL statement in a string.  The property is expecting an
array, but eveytime I try to set it with an array or object, I get the
exception error.  However, if I take the original property value

Dim arArray as Object
arArray = PivotCache.CommandText

I'm able to parse through arArray and get the values.  If I try and do
PivotCache.CommandText = arArray (no changes to arArray) the Exception is
thrown.  Why is that???

-Confused....

Well, I think I'm confused too. My understanding is that the CommandText property sets or returns a
string value and not an array. If arArray is defined as a String is the error generated?


Microsoft MVP (Visual Basic)



Tue, 11 Jan 2005 23:38:15 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Need help doing a Subtotal through Excel automation in vb.net

2. Excel Addin using vb.net Automation

3. Excel Automation with VB.Net

4. Excel Ole automation with VB.NET

5. Access-Excel Interoperability: Switching between two Application windows via automation (VBA)

6. Access 97 Automation - VBA For Excel

7. Save to New version : problem with VBA and Excel OLE Automation

8. wsh/vba for excel automation: moving worksheets beetween workbooks

9. Excel Automation via .NET

10. Windows EXCEL VBA / MAC EXCEL VBA compatibility issues

11. Excel 97 VBA vs Excel 2000 VBA

12. Accessing VBIDE.VBE.VBProjects via Excel in VB .NET Causes Excel To Crash When App Terminates

 

 
Powered by phpBB® Forum Software