PC Review


Reply
Thread Tools Rate Thread

Class modules Custom initialization Line

 
 
=?Utf-8?B?SiBTdHJlZ2Vy?=
Guest
Posts: n/a
 
      27th Jun 2007
I want to pass a variable into a custom class upon Initialization, so the
initialization header would look like this:

Private Sub Class_Initialize(rcdEVM as ADODB.Recordset)

But it seems I cannot do this as I need a custom event handler. The MSDN was
a bit cryptic on how this was done, so does anyone have experience in this
matter that can help?

Thank you!

--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

 
Reply With Quote
 
 
 
 
NickHK
Guest
Posts: n/a
 
      28th Jun 2007
VB/VBA does not support such constructors.
Youi will need to write some property/method in the class which performs
this function, then call it.

NickHK

"J Streger" <(E-Mail Removed)> wrote in message
news:20421249-3EDA-4A18-9B29-(E-Mail Removed)...
> I want to pass a variable into a custom class upon Initialization, so the
> initialization header would look like this:
>
> Private Sub Class_Initialize(rcdEVM as ADODB.Recordset)
>
> But it seems I cannot do this as I need a custom event handler. The MSDN

was
> a bit cryptic on how this was done, so does anyone have experience in this
> matter that can help?
>
> Thank you!
>
> --
> *********************
> J Streger
> MS Office Master 2000 ed.
> MS Project White Belt 2003
>



 
Reply With Quote
 
=?Utf-8?B?SiBTdHJlZ2Vy?=
Guest
Posts: n/a
 
      28th Jun 2007
Yet another reason I should consider C# before coding. I was so ignorant (and
blissful) when I just knew VBA :P

Thank you.
--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003



"NickHK" wrote:

> VB/VBA does not support such constructors.
> Youi will need to write some property/method in the class which performs
> this function, then call it.
>
> NickHK
>
> "J Streger" <(E-Mail Removed)> wrote in message
> news:20421249-3EDA-4A18-9B29-(E-Mail Removed)...
> > I want to pass a variable into a custom class upon Initialization, so the
> > initialization header would look like this:
> >
> > Private Sub Class_Initialize(rcdEVM as ADODB.Recordset)
> >
> > But it seems I cannot do this as I need a custom event handler. The MSDN

> was
> > a bit cryptic on how this was done, so does anyone have experience in this
> > matter that can help?
> >
> > Thank you!
> >
> > --
> > *********************
> > J Streger
> > MS Office Master 2000 ed.
> > MS Project White Belt 2003
> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
class modules versus modules Matt S Microsoft Excel Programming 1 12th Apr 2010 09:31 PM
Trying to learn custom event handling for class modules. JGPatrick Microsoft Access VBA Modules 3 22nd Jan 2010 10:24 PM
Public Variables, Class Modules and Standard Modules Excel Monkey Microsoft Excel Programming 2 30th Apr 2009 03:18 PM
Class modules: parametrize class object fields Jean-Pierre Bidon Microsoft Excel Programming 11 31st Aug 2006 02:49 PM
Basic question - modules and class modules - what's the difference? Mark Stephens Microsoft Excel Programming 9 8th May 2005 11:48 AM


Features
 

Advertising
 

Newsgroups
 


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