VBA and Constructors; exist?

M

McManCSU

Do constructors exist in VBA? All I have seen are static type
variables for the object's variables. For example, if you use the ne
statement, does it just create an object and you have to initialize it
fields, or does it look for a constructor?

Also, for the class module, do you need to export the code to use b
able to save it as the correct object name, say "person.cls"
 
T

Tom Ogilvy

for a class, I think the initialize event is considered the constructor:

Private Sub Class_Initialize()

End Sub
 
M

McManCSU

Is there a way to do this auto constructor and pass in arguments?

ie: cktbd as new CircuitBoard (size, side
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top