|
-
April 23rd, 2001, 07:30 PM
#1
How to pass a userdefined type to a function in class module ?
Hi all
Can i have a userdefined type passed to a method in class module like any API call which accepts userdefined types.
Thanks in advance
-venky
-
April 24th, 2001, 12:30 AM
#2
Re: How to pass a userdefined type to a function in class module ?
yap, u can pass user define type in activeX class module. like this
public type usertype
somethings ...
end type
public function test(param as usertype) as long
cksiow
http://vblib.virtualave.net - share our codes
-
April 24th, 2001, 11:42 AM
#3
Re: How to pass a userdefined type to a function in class module ?
but it gives the error message
"Only public user defined types of public object modules can be used as parameters or return types for public procedures of class modules or as fiedlds of public user defined types"
I am trying this in a standard exe
I had declared the usertype in a bas module and trying to pass it to a class module on click of a button.
-venky
-
April 24th, 2001, 11:46 AM
#4
Re: How to pass a userdefined type to a function in class module ?
No...!
you need a dll or an activex...
make a new project, dll type
you will have a class module
check instance property
be sure it is public/global or, in any case, creatable.
declare on top of that module your userdefined type.
in your normal exe, put a reference to the dll.
declare in your form the userdefined type this way:
private/public mytype as yourdllModuleName.YourType
that's all!
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
April 24th, 2001, 11:53 AM
#5
Re: How to pass a userdefined type to a function in class module ?
have a look:
http://codeguru.earthweb.com/cgi-bin...age=&view=&sb=
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
April 24th, 2001, 12:19 PM
#6
Re: How to pass a userdefined type to a function in class module ?
thanx... it worked fine.
can u tell me where can i get some details about the different types of instacing of a class.
-venky
-
April 27th, 2001, 06:01 AM
#7
Re: How to pass a userdefined type to a function in class module ?
Try with msdn (=vb Help) searcing for instancies/instancy property.
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|