Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
Hi, good morning. I bought a VB for Dummies Book (Muller) and Im stop up in
the chapter about Classes, I dont understand a word about classes, for example, I see the codes, but when I copy them and I press the F8 Button (to run it) nothing happens, where I can find some information about what to do with classes??? (in a For dummies Language) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
PD. I will chek your answers at night because Im leaving now, so Thanks in
Advance "filo666" wrote: Hi, good morning. I bought a VB for Dummies Book (Muller) and Im stop up in the chapter about Classes, I dont understand a word about classes, for example, I see the codes, but when I copy them and I press the F8 Button (to run it) nothing happens, where I can find some information about what to do with classes??? (in a For dummies Language) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
Two mistakes:
1. You bought and are trying to learn from a Dummies Book. 2. Class Modules in VBA are essentially useless. They are really only good for beautifying (read: complicating) buisiness process code, IMHO. Concentrate on learning how to write functions, sending and returning values from functions, and the language itself. I willing to bet that Dummy book uses examples such as: String1 + String 2 to concactenate strings, am I wrong? <shudder "filo666" wrote in message ... Hi, good morning. I bought a VB for Dummies Book (Muller) and I'm stop up in the chapter about Classes, I don't understand a word about classes, for example, I see the codes, but when I copy them and I press the F8 Button (to run it) nothing happens, where I can find some information about what to do with classes??? (in a For dummies Language) |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
If I was you I would just blow off the chapter on classes for a while. In VBA
there are not that many projects you will do that will require classes and they can be a little difficult to get your head around. Get the basics down first and then when you are feeling comfortable take a crack at classes... A class is a blueprint for creating objects. Once you have the blue print you can create as many of those objects as you want. In Excel there is a sheets class and that class is used to create (instantiate) sheet objects. The sheets object has properties (descriptions of the object) and methods (thing the object can do). When you add a sheet you basically instatiate an object of the sheets class. Since Excel already has workbooks and sheets and ranges, there is not a whole lot of need for you to create your own classes. Just use the object Excel supplies for you... "filo666" wrote: PD. I will chek your answers at night because Im leaving now, so Thanks in Advance "filo666" wrote: Hi, good morning. I bought a VB for Dummies Book (Muller) and Im stop up in the chapter about Classes, I dont understand a word about classes, for example, I see the codes, but when I copy them and I press the F8 Button (to run it) nothing happens, where I can find some information about what to do with classes??? (in a For dummies Language) |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
"Steve Schroeder" wrote in message ... 2. Class Modules in VBA are essentially useless. They are really only good for beautifying (read: complicating) buisiness process code, IMHO. Duck, the arrows should be flying any moment! String1 + String 2 to concactenate strings, am I wrong? You really have a bee about +. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
LOL...yeah, I imagine so. The only people who care about classes are
programmers. Yes I do have a 'bee' about +...lol. Ever see one of those gawd awful Sams or Queue books touting the latest version of VB, only to see in the first chapter examples of connecting strings using a +? Clearly they just regurgitate old chapters and tack on a new one at the end, and then fool the customer into thinking that have an up-to-date book on VBA/VB. Yuck! "Bob Phillips" wrote in message ... "Steve Schroeder" wrote in message ... 2. Class Modules in VBA are essentially useless. They are really only good for beautifying (read: complicating) buisiness process code, IMHO. Duck, the arrows should be flying any moment! String1 + String 2 to concactenate strings, am I wrong? You really have a bee about +. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
I would say the error was buying a VB book instead of an Excel VBA book
(unless he is going to program in VB). -- Regards, Tom Ogilvy "Steve Schroeder" wrote in message ... Two mistakes: 1. You bought and are trying to learn from a Dummies Book. 2. Class Modules in VBA are essentially useless. They are really only good for beautifying (read: complicating) buisiness process code, IMHO. Concentrate on learning how to write functions, sending and returning values from functions, and the language itself. I willing to bet that Dummy book uses examples such as: String1 + String 2 to concactenate strings, am I wrong? <shudder "filo666" wrote in message ... Hi, good morning. I bought a VB for Dummies Book (Muller) and I'm stop up in the chapter about Classes, I don't understand a word about classes, for example, I see the codes, but when I copy them and I press the F8 Button (to run it) nothing happens, where I can find some information about what to do with classes??? (in a For dummies Language) |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
http://www.oreilly.com/catalog/excel2000ian/
http://www.oreilly.com/catalog/exlmacro2/ Either one of these would probably be the best choice. "Tom Ogilvy" wrote in message ... I would say the error was buying a VB book instead of an Excel VBA book (unless he is going to program in VB). -- Regards, Tom Ogilvy "Steve Schroeder" wrote in message ... Two mistakes: 1. You bought and are trying to learn from a Dummies Book. 2. Class Modules in VBA are essentially useless. They are really only good for beautifying (read: complicating) buisiness process code, IMHO. Concentrate on learning how to write functions, sending and returning values from functions, and the language itself. I willing to bet that Dummy book uses examples such as: String1 + String 2 to concactenate strings, am I wrong? <shudder "filo666" wrote in message ... Hi, good morning. I bought a VB for Dummies Book (Muller) and I'm stop up in the chapter about Classes, I don't understand a word about classes, for example, I see the codes, but when I copy them and I press the F8 Button (to run it) nothing happens, where I can find some information about what to do with classes??? (in a For dummies Language) |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
"Steve Schroeder" wrote in message ... LOL...yeah, I imagine so. The only people who care about classes are programmers. Well I happen to think that classes are a necessary aspect of good design of an application, to achieve encapsulation, abstraction, ease of maintenance, and so on and so on. Much of this can be achieved in other ways, classes are just the best IMO. There are also some things you just cannot do without classes, application events as an example. Yes I do have a 'bee' about +...lol. It's just that I have seen you mention it twice today, but rarely encounter it in the 'real' world. Ever see one of those gawd awful Sams or Queue books touting the latest version of VB, only to see in the first chapter examples of connecting strings using a +? Clearly they just regurgitate old chapters and tack on a new one at the end, and then fool the customer into thinking that have an up-to-date book on VBA/VB. Can't comment on that, haven't read that many books, at least not ones that would address string concatenation. Read a SAMs book on SQL once, but don't think that had + <vbg |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
That's fair certainly. Personally, and quite obvious I'm sure, I've never
had a need for them. I've never had a real-world problem that required raising an event a control didn't already handle. Just like with database normalization/denormalization, abstraction, encapsulation can also be taken to extremes, making code a bitch to debug. I use functions almost exclusively, data in, data out...comment my code, and use error checking judiciously. If it gets any more complicated than that, it probably don't belong in an Office VBA app. again, my humble opinion...and not a judgement or criticism of anyone :) "Bob Phillips" wrote in message ... "Steve Schroeder" wrote in message ... LOL...yeah, I imagine so. The only people who care about classes are programmers. Well I happen to think that classes are a necessary aspect of good design of an application, to achieve encapsulation, abstraction, ease of maintenance, and so on and so on. Much of this can be achieved in other ways, classes are just the best IMO. There are also some things you just cannot do without classes, application events as an example. Yes I do have a 'bee' about +...lol. It's just that I have seen you mention it twice today, but rarely encounter it in the 'real' world. Ever see one of those gawd awful Sams or Queue books touting the latest version of VB, only to see in the first chapter examples of connecting strings using a +? Clearly they just regurgitate old chapters and tack on a new one at the end, and then fool the customer into thinking that have an up-to-date book on VBA/VB. Can't comment on that, haven't read that many books, at least not ones that would address string concatenation. Read a SAMs book on SQL once, but don't think that had + <vbg |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
There is actually a VBA for Dummies. Haven't read it myself, but it is
written by John Walkenbach, so it should be good. -- HTH RP (remove nothere from the email address if mailing direct) "Steve Schroeder" wrote in message ... http://www.oreilly.com/catalog/excel2000ian/ http://www.oreilly.com/catalog/exlmacro2/ Either one of these would probably be the best choice. "Tom Ogilvy" wrote in message ... I would say the error was buying a VB book instead of an Excel VBA book (unless he is going to program in VB). -- Regards, Tom Ogilvy "Steve Schroeder" wrote in message ... Two mistakes: 1. You bought and are trying to learn from a Dummies Book. 2. Class Modules in VBA are essentially useless. They are really only good for beautifying (read: complicating) buisiness process code, IMHO. Concentrate on learning how to write functions, sending and returning values from functions, and the language itself. I willing to bet that Dummy book uses examples such as: String1 + String 2 to concactenate strings, am I wrong? <shudder "filo666" wrote in message ... Hi, good morning. I bought a VB for Dummies Book (Muller) and I'm stop up in the chapter about Classes, I don't understand a word about classes, for example, I see the codes, but when I copy them and I press the F8 Button (to run it) nothing happens, where I can find some information about what to do with classes??? (in a For dummies Language) |
#12
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
I have a tool bar menu addin item that if you have it checked it
automatically add the name and path to the footer of the document being printed. To do this I need to use an event from a class module. No other choice. One simple example... "Steve Schroeder" wrote: That's fair certainly. Personally, and quite obvious I'm sure, I've never had a need for them. I've never had a real-world problem that required raising an event a control didn't already handle. Just like with database normalization/denormalization, abstraction, encapsulation can also be taken to extremes, making code a bitch to debug. I use functions almost exclusively, data in, data out...comment my code, and use error checking judiciously. If it gets any more complicated than that, it probably don't belong in an Office VBA app. again, my humble opinion...and not a judgement or criticism of anyone :) "Bob Phillips" wrote in message ... "Steve Schroeder" wrote in message ... LOL...yeah, I imagine so. The only people who care about classes are programmers. Well I happen to think that classes are a necessary aspect of good design of an application, to achieve encapsulation, abstraction, ease of maintenance, and so on and so on. Much of this can be achieved in other ways, classes are just the best IMO. There are also some things you just cannot do without classes, application events as an example. Yes I do have a 'bee' about +...lol. It's just that I have seen you mention it twice today, but rarely encounter it in the 'real' world. Ever see one of those gawd awful Sams or Queue books touting the latest version of VB, only to see in the first chapter examples of connecting strings using a +? Clearly they just regurgitate old chapters and tack on a new one at the end, and then fool the customer into thinking that have an up-to-date book on VBA/VB. Can't comment on that, haven't read that many books, at least not ones that would address string concatenation. Read a SAMs book on SQL once, but don't think that had + <vbg |
#13
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
Steve Schroeder wrote: I use functions almost exclusively, data in, data out...comment my code, and use error checking judiciously. If it gets any more complicated than that, it probably don't belong in an Office VBA app. It's a paradigm shift: you don't get it 'til you get it. I bet there are many out there who say, 'If the Macro Recorder can't record it, it probably don't belong in a macro,' but they have to 'get' the fact that Select'ing and Activate'ing isn't the best approach before they can progress. Jamie. -- |
#14
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
Hi Jamie,
I wondered when you were going to join in, and I am surprised by your muted tone. Where is my classes evangelist :-) Regards Bob "Jamie Collins" wrote in message ups.com... Steve Schroeder wrote: I use functions almost exclusively, data in, data out...comment my code, and use error checking judiciously. If it gets any more complicated than that, it probably don't belong in an Office VBA app. It's a paradigm shift: you don't get it 'til you get it. I bet there are many out there who say, 'If the Macro Recorder can't record it, it probably don't belong in a macro,' but they have to 'get' the fact that Select'ing and Activate'ing isn't the best approach before they can progress. Jamie. -- |
#15
Posted to microsoft.public.excel.programming
|
|||
|
|||
I don't understand classes¡¡¡¡
That's probably a fair assessment. I've never understood classes completely,
and therefore never use them and 'make due' with functions alone. A far cry from the macro example I believe, but your point is well taken. I would have to say it has more to do with style than anything else. A program will function and maintain just as well with functions alone, or classes and functions. Assuming both are well documented, and both use error checking judiciously. "Jamie Collins" wrote in message ups.com... Steve Schroeder wrote: I use functions almost exclusively, data in, data out...comment my code, and use error checking judiciously. If it gets any more complicated than that, it probably don't belong in an Office VBA app. It's a paradigm shift: you don't get it 'til you get it. I bet there are many out there who say, 'If the Macro Recorder can't record it, it probably don't belong in a macro,' but they have to 'get' the fact that Select'ing and Activate'ing isn't the best approach before they can progress. Jamie. -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Gap or something I cannot understand | Excel Discussion (Misc queries) | |||
Don't understand this format | Excel Discussion (Misc queries) | |||
not understand | New Users to Excel | |||
I don't Understand | Excel Worksheet Functions | |||
< |
Excel Worksheet Functions |