I am trying to generate SHA256 and CRC16/32 checksums in excel I've had to resort to combing the Web for code because Excel doesn't provide those functions. I found VBA code for the SHA256 function on Rosetta code (for reference its CSHA256 ' FILENAME: CSHA256.cls ' AUTHOR: Phil Fresle ' CREATED: 10-Apr-2001), it uses both a class module create and a code module to call the function. I needed to adjust it some to work in excel due to its public function was named the same as a cell SHA256. I was kind of successful after a few days. Is there a chance you could do a little Tech Help primer on these type of modules -generic Class VS Code module and why you NEED a separate function in the code module to actually call a function from the class module? I know you have had a few questions about Class modules in the past and the response is "you don't need them in Access" or something similar to that.. These are in VBA any chance on a quick video about what these are basically and Why we don't need them?
Kevin Yip 23 months ago
Richard doesn't teach this because Access database users usually don't need to create objects -- because all the objects they need are already present: forms, buttons, reports, textboxes, etc. The people who use class modules are mostly developers who create VBA plugins, like custom controls and such (and the code you found), which require custom VBA objects, which, in turn, need class modules.
The average Access users do create one type of class modules: form and report modules, since forms and reports are objects. In the VBA editor, all your form modules and report modules are listed under "Microsoft Access Class Objects."
James AllenOP 23 months ago
Ok.. He teaches Access, Excel (that which I am using with this specific question -VBA) and Visual basic (which is what these modules are a part of). I subscribe to this training site because he teaches things in great detail... not just average user stuff... If most of us needed just the usual average stuff we won't need this site.
I was hoping, and it sounded like others also in the past have wanted some at least basic info on this subject.
Who are you? It sounds like you are telling me I don't need what I want... education
Kevin Yip 23 months ago
By "average users," I meant the typical Access users, not that their skill level or knowledge is average (not necessarily anyway). What I said was the objective truth, which is the kind of truth that is true whether or not you believe it: typical Access users DON'T need to learn class modules because, as I said, they rarely have to create custom objects since Access already has all the objects they need built-in. In my 20+ years of Access usage in my former job I never had to create a class module, not once.
James AllenOP 23 months ago
OK OK OK ....forget the "average" user, I am asking for me then... OK?
I asked because of Excel.. forget the Access angle here, Please. There is more than Access on this site.
The UDF I have uses a large class module and a separate code module to call the functions IN EXCEL. I have also have worked with Access and Excel for more than 25 years myself and haven't dealt with Class modules either - That is why I am asking Richard, he is the expert.
Is Richard seeing this, If he says "Shut up and go away", I will happily .... until then.
You both make some valid points. Kevin is correct when he says that I have mentioned before in my videos and here on the site that you don't really need class modules unless you are getting into some super advanced developer level stuff both with Excel and Access. In my 30 years of developing and teaching Access I've never needed to create one. With that being said, I do plan on covering them in an upcoming Developer lesson because some people might find them handy. After that I'll probably do a tip video on them at some point.
James, I understand what you mean when you say you come here for education, and I do try to cover as many topics as I can. I focus on things that I believe will help the greatest number of people and class modules is just one of those esoteric topics that I'm not sure a lot of people will benefit from. I am going to cover them eventually.
Right now, I'm actually in the middle of a move so they're not going to get covered anytime soon but hopefully after things settle down and I'm finished living out of boxes I'll have some time for topics like this. We are all here to learn and help each other so let's keep things friendly and positive.
James AllenOP 23 months ago
OK,
Thank you for the response, I'll look forward to the video whenever it drops and I guess I'll figure it out on my own in the mean time.
Have a good day
Jim
Kevin Yip 23 months ago
Hi James, Richard can't teach everything, and he has to prioritize. Many of his students have jobs and livelihood that depend on Access knowledge that is the most practical and useful. I have plugins that use class modules too, and I did learn about them so I could at least read the code. But I've never had a need to make them myself. Again, form modules and report modules are class modules too. So you are essentially working with class modules when you use them.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
TechHelp.
The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.