Computer Learning Zone CLZ Access Excel Word Windows

Whether or not you can never become great at something, you can always become better at it. Don't ever forget that! And don't say "I'll never be good." You can become better! and one day you'll wake up and you'll find out how good you actually became.

-Neil deGrasse Tyson
 
Home   Courses   Seminars   Templates   TechHelp   Fast Tips   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Access >
TechHelp


Back to TechHelp
 

VBA Class Modules and UDF Upload Images   Link  
James Allen 
29 days ago
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
29 days 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 Allen
29 days 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
28 days 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 Allen
28 days 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.  
Richard Rost
27 days ago
Now, now boys. Everyone play nice.

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 Allen
27 days 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
27 days 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.
Add a ReplyUpload an Image


Back to TechHelp Comments
 

Start a NEW Conversation
 
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
 
Subscribe
Subscribe to TechHelp
Get notifications when this page is updated
 
 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard

Blog RSS Feed    Twitter

YouTube Channel    LinkedIn
Copyright 2023 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 2/8/2023 11:36:35 AM.