ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA Class Modules (https://www.excelbanter.com/excel-programming/371622-vba-class-modules.html)

Drakey

VBA Class Modules
 
I've been looking around for ages on the web and have managed to find
some really useful stuff around Class Modules, telling me what they are
and how to create basic ones, but I seem to be having trouble getting
some actual examples which relate to the real world. So it's therefore
proving difficult to get what I need.

I'm writing a programme to manage the property assets of a company.
The company owns several buildings (I'm avoiding calling them
properties for obvious reasons). Each building contains has several
things that are unique to that building (e.g. address, date lease was
signed) and it also contains a number of rooms. Again, each room has
it's own properties (current leasee, size etc...) and within each room
there are a number of items of furniture.

Therefore, I see there being the need for three classes.

Building
Room
Furniture

Using an Excel analogy, the building is like a workbook, the room is
like a worksheet and the furniture is like the cells. Therefore, I
would also expect to have to define classes such as;

Buildings
Rooms
Furnitures (obviously, not gramatically correct, but who's counting)

Can anyone tell me how to create this class structure, specifically
with how to add and delete rooms & furniture?

I'm really struggling and I'm completely sure that something like this
has already been done.

Cheers

Ian


Harald Staff

VBA Class Modules
 
If it helps: VBA is (almost) nothing but VB6 -unless you're a Mac user, then
it's VB5. You will find far more stuff on classes in the VB6 litterature.

HTH. Best wishes Harald

"Drakey" skrev i melding
ups.com...
I've been looking around for ages on the web and have managed to find
some really useful stuff around Class Modules, telling me what they are
and how to create basic ones, but I seem to be having trouble getting
some actual examples which relate to the real world. So it's therefore
proving difficult to get what I need.

I'm writing a programme to manage the property assets of a company.
The company owns several buildings (I'm avoiding calling them
properties for obvious reasons). Each building contains has several
things that are unique to that building (e.g. address, date lease was
signed) and it also contains a number of rooms. Again, each room has
it's own properties (current leasee, size etc...) and within each room
there are a number of items of furniture.

Therefore, I see there being the need for three classes.

Building
Room
Furniture

Using an Excel analogy, the building is like a workbook, the room is
like a worksheet and the furniture is like the cells. Therefore, I
would also expect to have to define classes such as;

Buildings
Rooms
Furnitures (obviously, not gramatically correct, but who's counting)

Can anyone tell me how to create this class structure, specifically
with how to add and delete rooms & furniture?

I'm really struggling and I'm completely sure that something like this
has already been done.

Cheers

Ian





All times are GMT +1. The time now is 07:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com