vbScript in Excel - How to start learning ?

Who is Participating?
Patrick MatthewsCommented:
I got my start by turning on the macro recorder, doing stuff, and then reviewing the code that the macro recorder generated.  It's a pretty effective way to get started, although it can cause one to develop bad habits (such as using too many Range(...).Select statements).

Unfortunately, the Excel VBA help files have seemed to have become less useful the last few versions, which is a pity.  I thought that the help file for 2000 was excellent, and for 2003 very good.  I am less sanguine about the 2007 and 2010 Excel VBA help files.  Even so, the help file is still useful.

Like sdwalker, I highly recommend using resources such as Experts Exchange.  Follow the activity of Experts who seem to know where there towels are (I am flattered that sdwalker included me on that list!), and ask questions when you get stuck, or just need to understand something a little better.  If you ask a question, and get back an answer that works but which you do not understand, insist that the Expert explain it better before you give a grade.

As you start feeling more comfortable, you should try answering questions yourself.  I have learned more in the course of trying to answer other people's questions than I have through any other source.

There are several Excel blogs I recommend following.  Many are worthwhile; these are my favorites:

If you are on Twitter, consider following these accounts for Excel:
matthews_p (yes, that's me engaging in shameless self-promotion)

As for books, I would recommend John Walkenbach's "Excel XXXX Power Programming with VBA", updated for each version of Excel, and "Professional Excel Development" by Rob Bovey, Dennis Wallentin, Stephen Bullen and John Green.  If you ever end up trying to programmatically manipulate the Ribbon, then I recommend "RibbonX" by Robert Martin, Ken Puls and Teresa Hennig.
NorieVBA ExpertCommented:
Do you mean VBS (Visual Basic Scripting) or VBA (Visual Basic for Applications)?

With VBS you would write and run the code outside Excel, whereas with VBA it's the opposite.
Hi ,

If you mean on how to write a macro, just start recording a macro, and see what you do it in macro editor.

Hope this help you.
Happy N.Y.
zmauAuthor Commented:
Sorry for the late answer.
I mean Visual Basic for Applications.
I know that I could start by recording a macro. But yesterday I've posted a question and got a nice answer (which worked), only I did not understand most of it.....

I think the best way is by doing what you're doing.  Peruse these boards, find users who seem to really know what they're doing (like zorvek, rorya, matthewspatrick ... heck, all the people over on the right) and follow them.  When you find code that you don't understand, don't hesitate to ask questions.  Also, you need to add breakpoints to the code (via F9 key) and step through the code (via F8) and watch what it does.  If they use variables, then add those in your watchlist.  Recording macros is a good idea.  I keep a text file where I copy / paste code that I want to remember.  I've even started a folder where I'm keeping little self-contained routines that I might need to refer to later.

Recognize that it's going to take time.  Most of the people on here (especially the really good ones) have been doing this for >10 years.  You're not going to learn it in 3 months.  I've been doing coding in Access and Excel since 1994.  

Good luck in your pursuits.  The willingness to dig in and figure it out is key ... so try to cultivate that!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.