Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA and Constructors; exist?
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" -- McManCS ----------------------------------------------------------------------- McManCSU's Profile: http://www.excelforum.com/member.php...fo&userid=2437 View this thread: http://www.excelforum.com/showthread.php?threadid=39178 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA and Constructors; exist?
for a class, I think the initialize event is considered the constructor:
Private Sub Class_Initialize() End Sub -- Regards, Tom Ogilvy "McManCSU" wrote in message ... Do constructors exist in VBA? All I have seen are static typed variables for the object's variables. For example, if you use the new statement, does it just create an object and you have to initialize its fields, or does it look for a constructor? Also, for the class module, do you need to export the code to use be able to save it as the correct object name, say "person.cls"? -- McManCSU ------------------------------------------------------------------------ McManCSU's Profile: http://www.excelforum.com/member.php...o&userid=24379 View this thread: http://www.excelforum.com/showthread...hreadid=391781 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA and Constructors; exist?
Is there a way to do this auto constructor and pass in arguments? ie: cktbd as new CircuitBoard (size, side -- McManCS ----------------------------------------------------------------------- McManCSU's Profile: http://www.excelforum.com/member.php...fo&userid=2437 View this thread: http://www.excelforum.com/showthread.php?threadid=39178 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA and Constructors; exist?
No, there is only one class constructor and it takes no
arguments. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "McManCSU" wrote in message ... Is there a way to do this auto constructor and pass in arguments? ie: cktbd as new CircuitBoard (size, side) -- McManCSU ------------------------------------------------------------------------ McManCSU's Profile: http://www.excelforum.com/member.php...o&userid=24379 View this thread: http://www.excelforum.com/showthread...hreadid=391781 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Check for a tab if it is exist | Excel Discussion (Misc queries) | |||
Exist or Not. | Excel Discussion (Misc queries) | |||
Am I Looking For Something That Doesn't Exist? | Excel Discussion (Misc queries) | |||
Does a book like this exist? | Excel Programming | |||
Does sheet exist? | Excel Programming |