🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.program
Article #203

How can I pass an object variant as an argument to a method?

#203
From: Leo Liu
Date: Mon, 26 Apr 1999 00:00
12 lines
1026 bytes
Windows 95/98
Visual Basic 6.0
For example, There is a COM Component A with type of MyObj, and A has a
method called test(arg1 as object,arg2 as object). B and C both are Button.
So the code is:

dim A as MyObj
set a=new MyObj
a.test(B,C)

These code will cause a Compile error(Syntax error).
How can I pass an object variant as an argument to a method?
Technical Details
Message-ID: <7g0ms6$7nm$1@news.cz.js.cn>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc86e,8da137971bdf1569,start
X-Google-Attributes: gidfc86e,public
From: "Leo Liu" <nkfd@263.net>
Subject: How can I pass an object variant as an argument to a method?
Date: 1999/04/26
Message-ID: <7g0ms6$7nm$1@news.cz.js.cn>
X-Deja-AN: 470896245
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
X-Complaints-To: usenet@news.cz.js.cn
X-Trace: news.cz.js.cn 925097670 7926 202.99.18.169 (26 Apr 1999 03:34:30 GMT)
Organization: The news server of Changzhou TeleCom
X-MSMail-Priority: Normal
NNTP-Posting-Date: 26 Apr 1999 03:34:30 GMT
Newsgroups: cn.bbs.comp.program