Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Best tutorial for building base/collection classes?

Greetings:

I have an Excel 2003 workbook with a sheet that was intended to schedule
someone on the sheet (marked with green cells) through automation to Outlook
2003. Now I find that I have to expand this to batch scheduling, and it
would seem that I'd have to use a Collection object as it gathers from the
sheet the event name, the employee name, start date, and end date, and that
the reference would have to be called from this snippet in my code:
' Stuff up here works
Next intColCounter
' Add a scheduled employee to the collection with event name, employee name,
start date, and end date that are stored in variables created above
Next intRowCounter
' Iterate through the collection and send Outlook appointments to shared
calendars (I know how to do this).

So, I've done a lot of searching through books and the Web, but nothing
seems to stick. Does anyone out there know of a basic primer or tutorial out
there that doesn't refer to VB 6 forms or is written in a continuous manner?
The "Microsoft Visual Basic 6.0 Programmer's Guide" is a bit disjointed.

Your help is most appreciated,
--
Brian J. Matuschak

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Best tutorial for building base/collection classes?


Te way you describe what you are trying to do leaves me a little
confused. In this circumstance I would normally do the following.

1. Create a class object to store the data about one person. Use Insert
ClassModule and name it eg clsMyPerson .
In the class module you need to create properties for each piece of
data (name, start date, etc) Use Insert ... Procedure ... Property

and variables in the Class Module to store the data

eg code in class module

Option Explicit

Dim sName As String

Public Property Get Name() As String
Name = sName
End Property

Public Property Let Name(ByVal sNewName As String)
sName = sNewName
End Property


Then in your loop (having declared a Dim ClsPerson as clsMyPerson)

set clsperson = new clsmyperson

populate the values

clsperson.name= namestringvalue

Then once populated just add it to a collection object. Although I
would normally keep the collection object in a class object of it's
own. As it makes it more manageable.

regards


--
tony h
------------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=548017

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Classes alish Excel Discussion (Misc queries) 3 October 30th 07 01:03 PM
Change base 6 to base 10? Brian Clarke Excel Discussion (Misc queries) 4 May 9th 06 02:24 PM
Classes containing Classes Adam[_15_] Excel Programming 2 April 1st 06 07:47 AM
Using Classes in .xla oli Excel Programming 2 June 3rd 05 11:37 AM
tutorial for building charts? Giovanni Excel Discussion (Misc queries) 2 April 22nd 05 03:58 PM


All times are GMT +1. The time now is 11:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"