Solved

New CallByName function in VB-6

Posted on 1998-12-09
2
215 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
Comment Utility
Edited text of question
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 200 total points
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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 …
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…
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…
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now