Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Using Instances of a Class

Stig,
Declare you class instance in a module, so it is globally available.

You can't use them on a worksheet, as they are object, so you cannot pass
them to UDF.
But you can pass them to a VBA function.

'assume this is you global variable that has suitably instantiated
Public MyInst as MyClass

'and you have function in a module
Public Function DoSomeWork(argIn as MyClass) As Long
With argIn....etc
End Function

You can call it with
Call DoSomeWork(MyInst)

Not sure what you mean "hell" in this case.

NickHK

"STIG" wrote in message
...
Hi!
I have a class Person, wich have it`s own properties and functions. When
creating instances of such a class, I would like to have them globally
avalable in excel, so that I can use them as input arguments in general
module UDF`s. Later on I would like to create controls for some of their
properties by means of some UserForm. After I have created an object, wich
hell do they recide in, and how can I get a hold of them. Can I make my

own
hell to store them in? And how do I pass them to a function from a
spreadsheet cell using "=function()" syntax?

Novice Norwegian



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create list of unique instances from list of multiple Instances Dishon Excel Worksheet Functions 0 March 3rd 08 10:46 AM
Class programming - how to return chartobject from a class? [email protected] Excel Programming 3 October 11th 06 12:07 PM
Class modules: parametrize class object fields Jean-Pierre Bidon Excel Programming 11 August 31st 06 02:49 PM
RaiseEvent from a class contained in a 2nd class collection? Andrew[_16_] Excel Programming 2 January 6th 04 04:22 PM
Is there an easy way to replace list A instances with list B instances (sorted lists). kkip Excel Programming 3 December 31st 03 01:50 PM


All times are GMT +1. The time now is 06:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"