|
-
Jun 17th, 2011, 02:30 PM
#4
Thread Starter
Member
Re: Declaring ClassModule as public
RhinoBull, VBClassicRocks Thanks a lot people
VBClassicRocks, thanks for the info....Actually there is no events in this class
"'in the module
Option Explicit
Public myClass As Class1
'elsewhere in your code - perhaps main form load event
Set myClass = New Class1 '<<< do it only once when program starts"
What about declaring the class-module in a module like this:
Public myClass As New Class1
and when exiting program. (set myclass = nothing)
By doing so i can avoid "Set myClass = New Class1" every time when i am calling this class...
Is that ok?
----------------------------------------------------------------------------------------------------------------------------------------------------
"Pasting somebody's Code or Link is easy; Spending some time and addressing the real issue & putting our own ideas and codes is difficult"
----------------------------------------------------------------------------------------------------------------------------------------------------
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
|