Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's a good way to learn VBA?

Status
Not open for further replies.

lhite

Technical User
Aug 1, 2002
133
0
0
US
I have worked with Access, Excel, and Word fairly extensively. I have made attempts at learning VBA, but while I have the "big picture", the details of coding (the actual objects, methods, etc.) still elude me.

Does anyone have a good suggestion as to how to pick up this knowledge? I have taken a VB course at a local community college, I taken an online course in VB, and I have perused a reference book on MS Office. I really wnat to learn the VBA for those three products, rather than VB.

Larry
 
I learnt (am still learning) by buying about 5 different books and looking at other peoples code. It's not easy to begin with but once you get going... Courses are all very well but real-world experience, putting together actual live databases, is invaluable. Any Access Bible by Prague and Irwin is a good place to start. (I used their A97 edition but I'm sure there is a A2002 version out there).
Persistence is key!
 
I am new to the game as well but I am working off of:

MASTERING MICROSOFT ACCESS 2000 DEVELOPMENT

Also I use GOOGLE.COM constantly as anything I come across I type in a description of the problem with terms like "ACCESS VBA" thrown in and I find TONS OF EXAMPLES!

Stick together...I'm getting addicted...
 
Don't forget your local Public library. Ours has a fairly good selection (especially getting started type things) and they are usually available.

Good Luck! Please remember to give helpful posts the stars they deserve! This makes the post more visible to others in need![thumbsup]
 
If you ahve worked with access a good bit and are now looking to get into coding, I would suggest The Access [Version Number] Developer's Handbook. It's a monster book. It's big, and some of it will be over your head for a little while. But it really is an amazing book.

Also, read the help files A LOT. Most of what I know I learned from the help files, comp.databases.ms-access, and that book.

And just write code. Get to know how intellisense works, so that you can write commands and have Access help you figure out the syntax of things.

And read through postings here to get ideas of what other people are having trouble with. Look for things that get a star with only a few postings. Try to recreate what other people are doing.

And read through the code in the sample applications that come with access.

And just build your application, because nothing makes you learn as quickly as needing to learn.

Hope this helps.

Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developer's section of the site for some helpful fundamentals.


Remember to reward helpful tips with the stars they deserve.
 
Doing it to me is the best way. In a classroom setting, you may not be experiencing some of the headaches(bugs), that "real-world" programmers face.

Plenty of reference material and creative thinking. But again, just start doing it, and you'll learn.

A book I found helpful is "Sams Teach yourself Visual Basic 6 in 24 hours"

Don't be fooled by the title, it is not intending to teach you vb in a day, rather the basics in 24 1 hour sessions complete with examples and without compromising the fundamentals of vb. Good luck
 
I just picked up a copy of The Access Cookbook after programming in VBA for Access for 3 years. I could hang myself for not getting this book sooner. In fact, as I was pulling my hair out I thought why doesn't someone write a book about problem solving? I think of it this way:
Huge book = learning English from the dictionary
Advanced book = learning English from a novel
Access Cookbook = learning English from 'See Spot Run, Run Spot Run'
 
Yes one important factor I neglected to mention is this site. It's saved me countless numbers of hours. When you get a spare 5 mins just have bit of a browse and you usually find something which is of either immediate use or can be set aside for future reference. (Now where's my commision site admin?!)
 
I agree with rookery - I've found the answer to so many problems on here, and the more experienced you get, the more answers you find - sometimes I can take the slightest hint from an answer and modify it to what I want it to do - You'll gradually pick it all up, and it will all start to hang together.

The best way to gain experience is to hack. Not a pretty word, certainly, and I'm sure people will disagree with me, but having the need to make databases, and not being able to quit (for work for example) means that you are forced to find solutions to problems, allbeit sometimes in a nasty way!

And remember the database you are currently working on is always better than the last (code wise), and will certainly be worse than the next!

So keep plugging with real solutions, and ask questions. Look at other peoples code - if you like the way a button performs a function in someone elses Db, then ask if you can take a look. Modifying someone elses code is quite a good way to learn...

Anyway....rant over....keep going, you'll learn to love it I'm sure.

Mincefish
 
Thanks everyone. I was hoping to find a more structured approach, but I do appreciate the responses.

Larry
 
Larry,

If you want a more structured approach I would suggest taking a Visual Basic course. All of the Access courses I've seen were too basic to get into VBA in any meaningful way. VB is a superset of VBA, and everything you learn about programming there will be directly applicable to VBA. Do be careful of the fact taht VB programmers use all unbound forms, and that is not necessary in Access (though VB programmers often think it is the best way to use Access). But you could learn a lot taking an intro and then an advanced VB course. PLus then you'd know VB, too, which could get you some better paying jobs!

Jeremy
(All I do is Access) =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developer's section of the site for some helpful fundamentals.
 
The way that I learnt was by opening up Access and just trying different things.

Try little things like displaying message boxes, printing to the debug window, closing forms, etc .. the help files in access are not that bad.

And of course the best way to learn is to grab other people's code from the Net, plug it into your program and see how it works line by line.

Good Luck..

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top