Object oriented programming in vba
Excel VBA has two types of modules. Regular modules and class modules. You
can add either type using the VBA menu Insert.
You can use any library function in VBA that you can use in C++ if the
functions are declared properly. For example in VBA you can use Wind32 DLLs
by declaring the DLL and the function you want to use.
To use class modules in VBA your main function will be a non Class module.
Your main routine will call the class module initialization function(s). The
first class module initialization function can call the other class module
initialization functions.
I hope this will help.
"M1kehailu" wrote:
Hello all, this is my first time posting here.
I would like some help visualizing a problem that I just cannot seem to do.
I know some sites do not allow to ask for help on coursework but I could not
find that in the rulebook here, and incase you need any more clarification,
yes it is my coursework for a uni project that I humbly ask for your help.
I have to structure a peice of software in VBA in an object oriented format
(i thought excel VBA lacked some inheritance functions that C++ has?) anyway,
my peice of software is to generate simple and log returns of 30 companies'
stock prices, generate the mean of those, then compute their variances.
For the life of me I cannot even begin to structure them into classes,
objects and whatnot, would anybody be kind enough to help a noob?
WARNING this is a 3 part question, i need help translating some other
functions too.
many thanks in advance to anyone's help
|