Solved

New CallByName function in VB-6

Posted on 1998-12-09
2
217 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 200 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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

772 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