on 09-21-2005 9:34 AM
Hi,
We are trying to build an Add-In with the SAP Connector Proxy and want to use the functions of the proxy in Excelsheets using the generated proxy.
Unfortunately the code completion suggestions as drop-down-list is only avaliable for the Proxy Object, but not for the routines in it (when typing <ProxyObj>.)
Is there a way to achieve that?
Greetings
Hi Michael,
As Reiner rightly pointed out, the code completion/auto list would usually work in VS.net unless there is a syntax error. Note that even for obejcts exposed through COM interop (using RCW) the VS.net IDE provides the method info by querying the interface in the type lib.
If I can guess correctly, you have already created the proxy using VS.net and .net connector and you are now trying to invoke methods in the proxy from the VBA code in the excel sheet. In this case the VBA editor would not autolist the routines.
Even I have run into this problem some time back when trying to use .net generated proxy in VBA code. However, in my case I created a new .net solution using VS.net, added the reference to the .net proxy and then simulated the method calls (by passing test arguments to the routines) using a windows forms application. VS.net now provided me all the auto list/code completion features. Once the simulation was done, then it was just a simple paste operation into the VBA editor. . This way although you still dont have code comlpetion features, but at least you should be able to simulate it.
Warm Regards
GJW
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are using VBA, you are not talking directly with the proxy, but with the COM object that .NET-COM-Inteop creates from it.
I would anyway not recommend to try to use the pure proxy directly from COM: BAPIs often have fairly complex types that need to be mapped to COM type system. This is most likely the place where the problem of VBA happens.
Better "shield" the proxies with some C# or VB.NET classes and expose them to COM with a specially defined COM interface. Set ComVisible to false for all but this interface. I'm sure that .NET-COM-Interop can create a nice easy TypeLib that will be understood by VBA's IntelliSense.
This should definitly work. If it doesn't it usualy has to do with some syntax errors somewhere. Or Visual Studio is somehow confuses ;-).
Which version of NCo do you use? Are the proxies in the same project?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.