?
Solved

New CallByName function in VB-6

Posted on 1998-12-09
2
Medium Priority
?
221 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
[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
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

Technology Partners: 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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Suggested Courses

719 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