Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

function parameter return with ActiveX exe

Posted on 1998-12-04
1
Medium Priority
?
129 Views
Last Modified: 2012-05-04
How can a method used in a VB client connecting to an VB 5.0 Automation server get back a changed parameter?
I defined e.g. in the  Server where Version is passed ByRef:
Public Function GetVersion( Version As String) As Long
  .. changes Version  ...
call in the Client:
MyAppl.GetVersion ( Version )

but Version is not changed !
0
Comment
Question by:philipdesmet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
GeddyWaring earned 800 total points
ID: 1448252
Hi Philip

The problem is in your calling convention.

The MyAppl.GetVersion(Version) is passing the parameter By value even though your function declares it By Reference.
Change the call to either "MyAppl.GetVersion Version" or "Call MyAppl.GetVersion(Version)"

Ged

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question