I am assuming u are populating the UDT's with data from database, so in that case whenever u start ur application u can redim the UDT's. If u r not doin this and like u said u don't know the no of elements then every time u add a element into the array use Preserve ReDim Statement. This statement will preserve the ubound of the element and the value as well. Hope this helps.
-----Original Message----- From: .ben [mailto:[EMAIL PROTECTED]] Sent: Friday, August 02, 2002 9:02 AM To: [EMAIL PROTECTED] Subject: [wdvltalk] RE: VB class programming Ok, I've sorta got what you mean. Thing is, when & where would I resize these arrays? I can't pre-define the sizes as they would be different each time I use the application. Should I be creating a dummy array of type uEntries, redim it, fill it, and then assign it to the .uEntries property of a .uMachine variable? hope this makes sense. cheers, .ben > -----Original Message----- > From: Rajput, Goutam [mailto:[EMAIL PROTECTED]] > Sent: 02 August 2002 13:55 > To: [EMAIL PROTECTED] > Subject: [wdvltalk] RE: VB class programming > > > Oh!! > What u have to do is define a module level variable of any of > the UDT type. > Now u can use this variable to pass to any function anywhere. > ************************************* > Module level declaration > Public Type uEntries > vId As Variant > aData() As Variant > End Type > Public Type uMachines > vId As Variant > vProfit As Variant > vPostalTotal As Variant > vDifference As Variant > aEntries() As uEntries > End Type > Public Type uSites > vName As Variant > vId As Variant > aMachines() As uMachines > End Type > Public Type uCustomer > vName As Variant > vId As Variant > aSites() As uSites > End Type > Public uTest As uCustomer > Function test(uTest As uCustomer) > uTest.aSites(0).aMachines(0).aEntries(0).aData(0) > End Function > ************************************* > Form load event > Private Sub Form_Load() > Call test(uTest) > End Sub > > > > -----Original Message----- > From: .ben [mailto:[EMAIL PROTECTED]] > Sent: Friday, August 02, 2002 8:41 AM > To: [EMAIL PROTECTED] > Subject: [wdvltalk] RE: VB class programming > > > Hmm. I did try this, as Public too - so I could use them in my Forms. > But when I tried to pass an array of type uMachine to a Form-level > function it spat the dummy on me - I forget the error - wish I had > written it down. > > any ideas? should all the processing be done in the Class or Module? > Surely I could still reference them in the form code? > > thanks for your help Goutam, very much appreciated. > > .b > > > -----Original Message----- > > From: Rajput, Goutam [mailto:[EMAIL PROTECTED]] > > Sent: 02 August 2002 13:39 > > To: [EMAIL PROTECTED] > > Subject: [wdvltalk] RE: VB class programming > > > > > > Declare the UDT's in a bas module or class file. > > > > > > -----Original Message----- > > From: .ben [mailto:[EMAIL PROTECTED]] > > Sent: Friday, August 02, 2002 6:57 AM > > To: [EMAIL PROTECTED] > > Subject: [wdvltalk] RE: VB class programming > > > > > > Hmm. > > > > > > I've tried those Type declarations in a Module (Public) and > > in the Form > > (Private) but I continually get errors about not being able to use > > late-binding. > > > > Should I declare those types publicly in a Module, or Privately in a > > Form? > > > > Cheers, > > > > .ben > > > > > -----Original Message----- > > > From: Rajput, Goutam [mailto:[EMAIL PROTECTED]] > > > Sent: 01 August 2002 17:34 > > > To: [EMAIL PROTECTED] > > > Subject: [wdvltalk] RE: VB class programming > > > > > > > > > Then u r good with the using UDT's instead of classes. > > > UDT's are faster,very simple and u don't have to maintain > > class code. > > > -----Original Message----- > > > From: .ben [mailto:[EMAIL PROTECTED]] > > > Sent: Thursday, August 01, 2002 12:25 PM > > > To: [EMAIL PROTECTED] > > > Subject: [wdvltalk] RE: VB class programming > > > > > > > > > This is a VB app. VB6. > > > > > > .b > > > > > > > -----Original Message----- > > > > From: Rajput, Goutam [mailto:[EMAIL PROTECTED]] > > > > Sent: 01 August 2002 16:58 > > > > To: [EMAIL PROTECTED] > > > > Subject: [wdvltalk] RE: VB class programming > > > > > > > > > > > > Is this an ASP or VB for app. req? > > > > > > > > -----Original Message----- > > > > From: .ben [mailto:[EMAIL PROTECTED]] > > > > Sent: Thursday, August 01, 2002 10:37 AM > > > > To: [EMAIL PROTECTED] > > > > Subject: [wdvltalk] RE: VB class programming > > > > > > > > > > > > ahh, I got it. > > > > > > > > my data structure is slightly complex... > > > > > > > > Customers(0 to XXX) > > > > Name > > > > ID > > > > Sites(0 to YYY) > > > > Name > > > > ID > > > > Machines(0 to 4) > > > > ID > > > > Profit > > > > PostalTotal > > > > Difference > > > > Entries(0 to 20) > > > > ID > > > > Data(0 to 72) > > > > > > > > Should I create a Customer, Site, Machine, Entry and Data > > class, and > > > > store each objexct in it's parent array? > > > > > > > > This data is then enumerated and written out as XML. > > > > > > > > Any comments/suggestions appreciated. > > > > > > > > .b > > > > > > > > > -----Original Message----- > > > > > From: Rajput, Goutam [mailto:[EMAIL PROTECTED]] > > > > > Sent: 01 August 2002 15:10 > > > > > To: [EMAIL PROTECTED] > > > > > Subject: [wdvltalk] RE: VB class programming > > > > > > > > > > > > > > > u can use this code in vb app. prog. also > > > > > u can create a class or use Form as a class. > > > > > > > > > > -----Original Message----- > > > > > From: .ben [mailto:[EMAIL PROTECTED]] > > > > > Sent: Thursday, August 01, 2002 9:57 AM > > > > > To: [EMAIL PROTECTED] > > > > > Subject: [wdvltalk] RE: VB class programming > > > > > > > > > > > > > > > hmm, that's ASP code... presumably iuse something > > > different for VB > > > > > application programming? > > > > > > > > > > > -----Original Message----- > > > > > > From: Rajput, Goutam [mailto:[EMAIL PROTECTED]] > > > > > > Sent: 01 August 2002 13:54 > > > > > > To: [EMAIL PROTECTED] > > > > > > Subject: [wdvltalk] RE: VB class programming > > > > > > > > > > > > > > > > > > Class CArray > > > > > > Private sSeasons() > > > > > > Property Get SeasonsProp() > > > > > > SeasonsProp = sSeasons > > > > > > End Property > > > > > > Private Sub Class_Initialize() > > > > > > ReDim sSeasons(3) > > > > > > sSeasons(0) = "Spring" > > > > > > sSeasons(1) = "Summer" > > > > > > sSeasons(2) = "Autumn" > > > > > > sSeasons(3) = "Winter" > > > > > > End Sub > > > > > > End Class > > > > > > > > > > > > Dim oCArray > > > > > > Dim x > > > > > > Set oCArray = New CArray > > > > > > For Each x In oCArray.SeasonsProp > > > > > > response,write "Item: " + x > > > > > > Next > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > From: .ben [mailto:[EMAIL PROTECTED]] > > > > > > Sent: Tuesday, July 30, 2002 9:03 AM > > > > > > To: [EMAIL PROTECTED] > > > > > > Subject: [wdvltalk] VB class programming > > > > > > > > > > > > > > > > > > Hi. Does anyone here know how to make a Class in VB6 which > > > > > > has an array > > > > > > as one of its properties? > > > > > > > > > > > > Any help appreciated. > > > > > > > > > > > > .n > > > > > > > > > > > > > > > > > > ____ * The WDVL Discussion List from WDVL.COM * ____ > > > > > > To Join wdvltalk, Send An Email To: > > > > > > mailto:[EMAIL PROTECTED] > > > > > > Send Your Posts > > > > > > To: [EMAIL PROTECTED] > > > > > > To change subscription settings to the wdvltalk > > digest version: > > > > > > http://wdvl.internet.com/WDVL/Forum/#sub > > > > > > > > > > > > ________________ http://www.wdvl.com > _______________________ > > > > > > > > > > > > You are currently subscribed to wdvltalk as: > > [EMAIL PROTECTED] > > > > > > To unsubscribe send a blank email to %%email.unsub%% > > > > > > > > > > > > ____ . The WDVL Discussion List from WDVL.COM . ____ > > > > > > To Join wdvltalk, Send An Email To: > > > > > > mailto:[EMAIL PROTECTED] > > > > > > Send Your Posts > > > > > > To: [EMAIL PROTECTED] > > > > > > To change subscription settings to the wdvltalk > > digest version: > > > > > > http://wdvl.internet.com/WDVL/Forum/#sub > > > > > > > > > > > > ________________ http://www.wdvl.com > _______________________ > > > > > > > > > > > > You are currently subscribed to wdvltalk as: > > [EMAIL PROTECTED] > > > > > > To unsubscribe send a blank email to > > > > > > %%email.unsub%% > > > > > > > > > > > > > > > > > > > > > ____ * The WDVL Discussion List from WDVL.COM * ____ > > > > > To Join wdvltalk, Send An Email To: > > > > > mailto:[EMAIL PROTECTED] > > > > > Send Your Posts > > > > > To: [EMAIL PROTECTED] > > > > > To change subscription settings to the wdvltalk > digest version: > > > > > http://wdvl.internet.com/WDVL/Forum/#sub > > > > > > > > > > ________________ http://www.wdvl.com _______________________ > > > > > > > > > > You are currently subscribed to wdvltalk as: > [EMAIL PROTECTED] > > > > > To unsubscribe send a blank email to %%email.unsub%% > > > > > > > > > > ____ . The WDVL Discussion List from WDVL.COM . ____ > > > > > To Join wdvltalk, Send An Email To: > > > > > mailto:[EMAIL PROTECTED] > > > > > Send Your Posts > > > > > To: [EMAIL PROTECTED] > > > > > To change subscription settings to the wdvltalk > digest version: > > > > > http://wdvl.internet.com/WDVL/Forum/#sub > > > > > > > > > > ________________ http://www.wdvl.com _______________________ > > > > > > > > > > You are currently subscribed to wdvltalk as: > [EMAIL PROTECTED] > > > > > To unsubscribe send a blank email to > > > > > %%email.unsub%% > > > > > > > > > > > > > > > > > ____ * The WDVL Discussion List from WDVL.COM * ____ > > > > To Join wdvltalk, Send An Email To: > > > > mailto:[EMAIL PROTECTED] > > > > Send Your Posts > > > > To: [EMAIL PROTECTED] > > > > To change subscription settings to the wdvltalk digest version: > > > > http://wdvl.internet.com/WDVL/Forum/#sub > > > > > > > > ________________ http://www.wdvl.com _______________________ > > > > > > > > You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] > > > > To unsubscribe send a blank email to %%email.unsub%% > > > > > > > > ____ . The WDVL Discussion List from WDVL.COM . ____ > > > > To Join wdvltalk, Send An Email To: > > > > mailto:[EMAIL PROTECTED] > > > > Send Your Posts > > > > To: [EMAIL PROTECTED] > > > > To change subscription settings to the wdvltalk digest version: > > > > http://wdvl.internet.com/WDVL/Forum/#sub > > > > > > > > ________________ http://www.wdvl.com _______________________ > > > > > > > > You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] > > > > To unsubscribe send a blank email to > > > > %%email.unsub%% > > > > > > > > > > > > > ____ * The WDVL Discussion List from WDVL.COM * ____ > > > To Join wdvltalk, Send An Email To: > > > mailto:[EMAIL PROTECTED] > > > Send Your Posts > > > To: [EMAIL PROTECTED] > > > To change subscription settings to the wdvltalk digest version: > > > http://wdvl.internet.com/WDVL/Forum/#sub > > > > > > ________________ http://www.wdvl.com _______________________ > > > > > > You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] > > > To unsubscribe send a blank email to %%email.unsub%% > > > > > > ____ . The WDVL Discussion List from WDVL.COM . ____ > > > To Join wdvltalk, Send An Email To: > > > mailto:[EMAIL PROTECTED] > > > Send Your Posts > > > To: [EMAIL PROTECTED] > > > To change subscription settings to the wdvltalk digest version: > > > http://wdvl.internet.com/WDVL/Forum/#sub > > > > > > ________________ http://www.wdvl.com _______________________ > > > > > > You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] > > > To unsubscribe send a blank email to > > > %%email.unsub%% > > > > > > > > > ____ * The WDVL Discussion List from WDVL.COM * ____ > > To Join wdvltalk, Send An Email To: > > mailto:[EMAIL PROTECTED] > > Send Your Posts > > To: [EMAIL PROTECTED] > > To change subscription settings to the wdvltalk digest version: > > http://wdvl.internet.com/WDVL/Forum/#sub > > > > ________________ http://www.wdvl.com _______________________ > > > > You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] > > To unsubscribe send a blank email to %%email.unsub%% > > > > ____ . The WDVL Discussion List from WDVL.COM . ____ > > To Join wdvltalk, Send An Email To: > > mailto:[EMAIL PROTECTED] > > Send Your Posts > > To: [EMAIL PROTECTED] > > To change subscription settings to the wdvltalk digest version: > > http://wdvl.internet.com/WDVL/Forum/#sub > > > > ________________ http://www.wdvl.com _______________________ > > > > You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] > > To unsubscribe send a blank email to > > %%email.unsub%% > > > > > ____ * The WDVL Discussion List from WDVL.COM * ____ > To Join wdvltalk, Send An Email To: > mailto:[EMAIL PROTECTED] > Send Your Posts > To: [EMAIL PROTECTED] > To change subscription settings to the wdvltalk digest version: > http://wdvl.internet.com/WDVL/Forum/#sub > > ________________ http://www.wdvl.com _______________________ > > You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] > To unsubscribe send a blank email to %%email.unsub%% > > ____ . The WDVL Discussion List from WDVL.COM . ____ > To Join wdvltalk, Send An Email To: > mailto:[EMAIL PROTECTED] > Send Your Posts > To: [EMAIL PROTECTED] > To change subscription settings to the wdvltalk digest version: > http://wdvl.internet.com/WDVL/Forum/#sub > > ________________ http://www.wdvl.com _______________________ > > You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] > To unsubscribe send a blank email to > %%email.unsub%% > ____ * The WDVL Discussion List from WDVL.COM * ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% ____ � The WDVL Discussion List from WDVL.COM � ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
