LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel 2003 VBA calling VB.NET ?

OK, thanks for the feedback.

The previous version of the VBA worked swell with the VB.NET when using .NET
1.1 framework. The API writers mandated a migration to the .NET 2.0
framework and the VBA app no longer could accept the return value from the
function, EntitySuccessType due to:
<quote
compatibilty issue involving nullable primitives and DotNet Framework 1.1.

Our V3 WSDLs use Nullable primitives (a feature fully supported by DotNet
Framework 2.0 and greater but not 1.1) this explains why developers using the
older DotNet Framework 1.1 experience this issue.

I would suggest that those who use DotNet Framework 1.1 migrate to DotNet
Framework 2.0 (or above) for an immediate workaround (not to mention the
long-term benefits of migrating to the newer framework).

NOTE: Current users of DotNet Framework 2.0 or above and Java/Perl/PHP/etc.
users are NOT affected by this issue, please continue migrating to our V3
WSDLs if you have not already done so.
</quote

So before the migration the code:
<prev
Dim result = Object
Set result = API.AddCampaigns(AccountID, var)
Dim created() As EntitySuccessType
created = result.SuccessRow
Dim i As Integer
For i = LBound(created) To UBound(created)
'Store the newly created accountIDS
</prev

So I attempted to return an array of ID's to work around the documented
problem. While debugging the .NET, I can see my array being built I just
cannot wrap my brain around how to pass this back to my VBA - calling routine
from this VB.NET function.

"NickHK" wrote:

Unless I'm missing something, you're trying to set an unitialised array of
longs equal to an object :

Dim result As Object
Dim aResults() As Long

Set result = API.AddCampaigns(AccountID, var)
aResults = result

NickHK

"Okiebug" wrote in message
...
I am having issues after upgrading the VB.NET to use .NET 2 as needed per

a
Web Service.
I am having problems with the return variable from the VB.NET to the VBA

code:

VBA invoked from Excel:
<code

Public Sub MSNAddTemplateCampaigns(ByVal AccountID As Long, ByRef
MonthlyBudget As Long)

Dim API As New ADcenter.API

Dim result As Object

Dim Row As Integer

Dim aResults() As Long

Dim Campaigns() As ADcenter.AdCenterCampaign

Dim var As Variant



Dim sheet As Worksheet




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling a DLL in MS-Excel Jim Excel Programming 1 March 22nd 06 06:16 AM
Calling functions developed in VSTO 2005 from Office Excel 2003 Neil Janabi Excel Programming 0 March 16th 06 10:50 AM
Calling Solver from an Excel 2003 Macro expatgr Excel Programming 1 August 19th 04 01:18 PM
Calling Excel from C++ GL[_2_] Excel Programming 1 August 9th 04 09:15 PM
Calling from C#.Net App Office._CommandBarButton.Execute() method in Excel 2003 throws a COMException Jacek Excel Programming 1 December 21st 03 03:48 PM


All times are GMT +1. The time now is 01:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"