Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default What is the benifit to programming w/ Class Modules

Greetings,
I am a novice trying to fully or at least partially understand the
benifits to Class Modules. After looking through a ton of stuff on the
internet i find myself even more confused. Seems like an awful lot of typing
for little result. What am i missing?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default What is the benifit to programming w/ Class Modules

"Office_Novice" wrote in message
...
Greetings,
I am a novice trying to fully or at least partially understand the
benifits to Class Modules. After looking through a ton of stuff on the
internet i find myself even more confused. Seems like an awful lot of
typing
for little result. What am i missing?


Some links for you:

http://msdn.microsoft.com/en-us/libr...ffice.10).aspx

http://puremis.net/excel/code/086.shtml

http://exceltip.com/st/Class_modules...Excel/510.html


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default What is the benifit to programming w/ Class Modules

Thanks for the links they have been bookmarked.

"Nobody" wrote:

"Office_Novice" wrote in message
...
Greetings,
I am a novice trying to fully or at least partially understand the
benifits to Class Modules. After looking through a ton of stuff on the
internet i find myself even more confused. Seems like an awful lot of
typing
for little result. What am i missing?


Some links for you:

http://msdn.microsoft.com/en-us/libr...ffice.10).aspx

http://puremis.net/excel/code/086.shtml

http://exceltip.com/st/Class_modules...Excel/510.html



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default What is the benifit to programming w/ Class Modules

I have an introduction to classes on my web site at
http://www.cpearson.com/excel/Classes.aspx. A class module is used to
present an abstraction of anything you need to work with in your
program. For example, for a office productivity application, you need
to deal with people. You would create a class named CPerson, give it
properties (which are like adjectives -- they describe attributes such
as Name, Address, Salary) and give it methods (which are like verbs --
they carry out actions, like PrintPaycheck). Once you have a class,
you create instances of the class called object (Dim Pawn As CPerson,
Dim Boss As CPerson) and you can pass those objects around within an
application, and the code that uses them need not know the internals
of how a class is implemented. The code can simply examine the
appropriate properties or carry out the various methods while being
peacefully oblivious to all else that makes up the class.

If you programmed with structures (also called structs or records), a
class is like a structure except that it executes code in addition to
simply storing data value in an organized way.


Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
The San Diego Project Group, LLC
(email is on the web site)
USA Central Daylight Time (-5:00 GMT)



On Wed, 1 Oct 2008 09:49:01 -0700, Office_Novice
wrote:

Greetings,
I am a novice trying to fully or at least partially understand the
benifits to Class Modules. After looking through a ton of stuff on the
internet i find myself even more confused. Seems like an awful lot of typing
for little result. What am i missing?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default What is the benifit to programming w/ Class Modules

Thanks for the reply Chip,
I spend an awful lot of time on your site and have seen the introduction to
classes. So using your example would I have to create a new class for each
person, or just one for everybody?

"Chip Pearson" wrote:

I have an introduction to classes on my web site at
http://www.cpearson.com/excel/Classes.aspx. A class module is used to
present an abstraction of anything you need to work with in your
program. For example, for a office productivity application, you need
to deal with people. You would create a class named CPerson, give it
properties (which are like adjectives -- they describe attributes such
as Name, Address, Salary) and give it methods (which are like verbs --
they carry out actions, like PrintPaycheck). Once you have a class,
you create instances of the class called object (Dim Pawn As CPerson,
Dim Boss As CPerson) and you can pass those objects around within an
application, and the code that uses them need not know the internals
of how a class is implemented. The code can simply examine the
appropriate properties or carry out the various methods while being
peacefully oblivious to all else that makes up the class.

If you programmed with structures (also called structs or records), a
class is like a structure except that it executes code in addition to
simply storing data value in an organized way.


Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
The San Diego Project Group, LLC
(email is on the web site)
USA Central Daylight Time (-5:00 GMT)



On Wed, 1 Oct 2008 09:49:01 -0700, Office_Novice
wrote:

Greetings,
I am a novice trying to fully or at least partially understand the
benifits to Class Modules. After looking through a ton of stuff on the
internet i find myself even more confused. Seems like an awful lot of typing
for little result. What am i missing?




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default What is the benifit to programming w/ Class Modules

You would create one class instance for every person (Set Person = New
cPerson). It would be useful to group the people into a collection class,
which gives you the ability to iterates through every member (person) of
that class.

--
__________________________________
HTH

Bob

"Office_Novice" wrote in message
...
Thanks for the reply Chip,
I spend an awful lot of time on your site and have seen the introduction
to
classes. So using your example would I have to create a new class for each
person, or just one for everybody?

"Chip Pearson" wrote:

I have an introduction to classes on my web site at
http://www.cpearson.com/excel/Classes.aspx. A class module is used to
present an abstraction of anything you need to work with in your
program. For example, for a office productivity application, you need
to deal with people. You would create a class named CPerson, give it
properties (which are like adjectives -- they describe attributes such
as Name, Address, Salary) and give it methods (which are like verbs --
they carry out actions, like PrintPaycheck). Once you have a class,
you create instances of the class called object (Dim Pawn As CPerson,
Dim Boss As CPerson) and you can pass those objects around within an
application, and the code that uses them need not know the internals
of how a class is implemented. The code can simply examine the
appropriate properties or carry out the various methods while being
peacefully oblivious to all else that makes up the class.

If you programmed with structures (also called structs or records), a
class is like a structure except that it executes code in addition to
simply storing data value in an organized way.


Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
The San Diego Project Group, LLC
(email is on the web site)
USA Central Daylight Time (-5:00 GMT)



On Wed, 1 Oct 2008 09:49:01 -0700, Office_Novice
wrote:

Greetings,
I am a novice trying to fully or at least partially understand the
benifits to Class Modules. After looking through a ton of stuff on the
internet i find myself even more confused. Seems like an awful lot of
typing
for little result. What am i missing?




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
Class programming - how to return chartobject from a class? [email protected] Excel Programming 3 October 11th 06 12:07 PM
Class modules: parametrize class object fields Jean-Pierre Bidon Excel Programming 11 August 31st 06 02:49 PM
Basic question - modules and class modules - what's the difference? Mark Stephens[_3_] Excel Programming 9 May 8th 05 11:48 AM
Class modules pk Excel Programming 2 October 3rd 03 03:45 AM
Class Modules vs Modules Jeff Marshall Excel Programming 2 September 28th 03 07:57 PM


All times are GMT +1. The time now is 03:00 AM.

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

About Us

"It's about Microsoft Excel"