Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

New CallByName function in VB-6

Posted on 1998-12-09
2
Medium Priority
?
222 Views
Last Modified: 2008-03-03
I have a property Text(0) in one of my VC DLLs. When I try to assign the value to Text(0) property in VB-6 using CallByName method it gives me an error
'Object doesn't support this property or method'

Code is as follows.

dim po as PORESOURCELib.beResource

CallByName po, sPropname$, VbLet, aTstData(pst)

Where po is the object, sPropname$ contains the property name Text(0) and aTstData(pst) contains the value which I want to assign to that property.

Please tell me the reason why it's failing?
Does VB-6 support such property assignment?
0
Comment
Question by:sunita111698
2 Comments
 

Author Comment

by:sunita111698
ID: 1448975
Edited text of question
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 400 total points
ID: 1448976
The name of the property is "text" not text(0). The property text is most likely a safearray and you have to pass the entire array to C.
If text is a parametered property than you have to pass it as an argument
CallByName po, sPropname$, VbLet, 0, aTstData(pst)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

877 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