Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Property Set

Status
Not open for further replies.

ak48

Technical User
Aug 1, 2003
34
US
Hi, I'm trying to figure out how to use the Property Set statement but the help isn't quite clear about it. Could somebody help me. What I need is to be able to define an object by a number as : Set MyObject = "MyNumber". Can I do this?
 
Not real sure this is what you are after but assume this is it
you need to refer to the property which you wish to set

Set MyObject.name = "MyNumber"
Set MyObject.value= "MyNumber"
 
Sorry I wasn't really clear in my last post. What I mean is, in a class module, you have a type of procedure "Property set". The help file is not quite clear about it but it seems to me that it can be used to control the 'Set' property of a user-defined object. Exemple : let's say I have a custom object called Obj of type MyObject (witch is a user-defined object, with is own class module). If I want to use it in a procedure I have to do the following :

Dim obj as MyObject

Set obj = New MyObject

What I would like to do is to be able to give a parameter to the Set property (Just like a recordset witch receive an SQL statement as a parameter : set rec = db.openrec(SQL))

So I would like to Set my object in a similar way (Like Set obj = MyObject(Parameter) or something like this) I could then perform some actions with the given parameter (i.e. set some default properties value for Obj) through the Property set function. I am pretty sure this can be done, but I don't know how... Thanx for the help and tell if anything in this post is confusing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top