# Off Topic > The Water Cooler >  >  How did you learn VBA

## raineysky

I'm curious as to how you learned VBA. Were you self-taught by reading books, taking classes, etc. and how long did it take before you were pretty good at it.

----------


## contaminated

on the forum.... really!!!! I'm not master of course but I familiar with programming basics. In additional, other members of the forum will help you as well..

----------


## Mordred

I just starting learning VBA in late May 2010.  I've done some learning by reading (I only have 2 books and one is VBA for Access while the other is a small beginners manual).  The core of my learning has been from recording macros and then incorporating the recordings into my own subs and; coming to this one forum on a daily basis.  I've been planning on buying some advanced books for VBA but I don't which ones are good and which ones are bad.  They are all expensive and I don't want to waste my money on something that will only be opened once.

----------


## DonkeyOte

Macro Recorder, Forums, Lots and Lots and Lots of Trial and Error (mainly error).

----------


## romperstomper

Books and forums. Once you think you know an area reasonably well, try and answer questions related to it. That will quickly tell you whether you really know it. Even better, try explaining your answers - if you can't, hit the books again.
I've been coding for about 12 years now and still have a ways to go, but at least I'm better than I was!  :Wink:

----------


## Cheeky Charlie

I'd love to know VBA...

----------


## TMS

I went on a course several years ago.  Then I found a project to work on ... calculation of the Bradford Factor for HR sickness reports ... and asked a lot of questions on the Excel forums.  In many cases, I recorded a macro as I carried out a task and then edited it to make it more general, flexible and efficient.  As far as efficiency goes, there's lots to learn ... and I truly have a lot to learn.  And I read lots and lots of books ... highly recommend all of John Walkenbach's books.  I used to visit the web sites of many of the contributers and many of them provide invaluable advice, guidance, worked examples and free downloads.  There's too many to mention here but I wouldn't be surprised if there isn't a list somewhere.

As romperstomper has said, trying to answer questions in the forums is a good way of developing your knowledge.  It is interesting to see the different solutions provided ... and realise just how much you still have to learn.  :-(

Regards

----------


## Domski

> I'm curious as to how you learned VBA. Were you self-taught by reading books, taking classes, etc.



95% self taught by reading posts on forums and trying to work things out for myself. 5% from books that I should probably look at more often.





> and how long did it take before you were pretty good at it.



At the rate I'm going about another 25-30 years I reckon.

Dom

----------


## Andrew-R

I taught myself macros back before VBA became the macro language, working entirely from the Excel manuals that used to come with a copy of MS-Office (yes, really, printed and bound manuals, that were yours to keep forever and which clogged up office cabinets across the world).

It took me *ages* to work out how variables worked, because they used named cells (which I'd never used before) and all of the examples just showed the value in a cell and a comment with the variable name in the cell to the right, so I'd type in code which mirrored the code printed in the manuals exactly, and yet it wouldn't work  :Smilie: 

About the same time I took a Visual Basic course, so when VBA became the macro language a combination of knowing VB, knowing ordinary BASIC and being familiar with Excel meant the tranisition was pretty smooth.

That said, even after 15 years of writing Excel macros, I've learned a *huge* amount from this forum in just a couple of months.  I'm the data manager for a market research company, so most of my Excel work is with very large quantities of quite structured data and looking at some of the problems on here has encouraged me to stray down byways of Excel coding that I'd never use for my own job.

I'm now living in dread of the day when MS switch to some VB.Net derivative for their macro language and I'm back to being a raw newbie again.  Hopefully the nice people here will help me out when that dreaded day arrives.

----------


## Andy Pope

Self taught from books. Forums are great for working on real world examples and pickup tips, tricks and alternatives.

1980's................................Present day.......tomorrow
Basic (BBC/Apple) > Fortran > VB > VBA > .Net

----------


## martindwilson

i know lots about ABV !!!!  :Smilie:  :Smilie:  :Smilie:

----------


## oldchippy

What's VBA?  :Wink:

----------


## Andrew-R

VBA = Very Big Attachments

It's a method of using Excel to generate so much data that you couldn't read it in a lifetime, let alone check that it's correct.

For example:




```
Please Login or Register  to view this content.
```


This is an incredibly useful function to generate a spreadsheet that you can sit and look at all day.  If anybody comes near your desk scribble down some of the numbers on a bit of paper or highlight a selection of cells and look at them in a puzzled fashion.

I wrote this VBA script 8 years ago, when I started this job, since when I have done nothing day-in, day-out, but stare at it.

My code isn't copyrighted, so please feel free to take a copy for your own use.

----------


## romperstomper

I have a similar one that switches sheets, selects cells and creates random pivot tables and charts. It is proprietary though, I'm afraid.

----------


## Domski

Mine does all that as well as pdf'ing the results and emailing them to various managers.

That they don't understand why they've been sent these random numbers only reinforces their opinion that they don't understand anything that I do but whatever it is I must be very good at it.

Dom

----------


## romperstomper

You're assuming they even read them.  :Smilie:

----------


## Domski

I know they don't read them. I occasionally send them some real information telling them something really bad to double check that they don't.

Dom

----------


## romperstomper

I used to put swear words in the middle of our business plans to see if my boss read them. Turns out he didn't, he just sent them out...

----------


## Andrew-R

Once again I am made to feel like a newbie by the distinguished members of this forum.

All of those years wasted, just staring at numbers, when all the while I could have been e-mailing them to other people to stare at as well  :Frown:

----------


## davegugg

Ha, good stories.  I created a workbook with a front page to show the status of a "report" I was running.  I pasted in a large chunk of data (probably 1000 rows X 100 columns) onto sheet 2.  Then the front status sheet would had a cell labeled "Currently Processing" and all the data from sheet 2 was cycled through there so it looked like the "report" was calculating something.  To top it off I created a huge status bar going from 0 to 100%.  Then I'd fire it up and have about an hour to spend on Excel Forum while I waited for my report to finish running.  :Smilie:

----------


## Saarang84

To me, learning VBA started as part of my job.. I'm an MI analyst like Dom, till 3 years back.. Never ever started using MS Office .. particularly Excel, till August 2008. Now been using it very much daily since then.

Am a bit good at programming with VB 6, so coding VBA doesn't look difficult. Just a bit of adjusting to the worksheets, workbooks and stuff. I don't code much in advance level, been trying to learn a bit of advanced programming with excel. Just do away a lot with formulas.

Sarang

----------


## Saarang84

Hey Dom, need some of help from you.. Your flagging code i came across is too advanced from my tiny brain...

----------


## raineysky

Great stories. Looks like most of you are more or less self-taught. It still amazes me how you guys can do what you do with Excel. I have used it since the mid 90's at work but never really had the time to truly learn the capabilities of this great program. Now I have a little more time on my hands and want to learn much more. 

I am confident that most manufacturing facilities (my line of work) are not even scratching the surface of what can be done with Excel to improve productivity at their plants on the shop floor level. Entering some production numbers in a spreadsheet and printing it out for the boss is not exactly optimizing the process ;-) 

Thanks for all of the responses so far and please keep them coming.

----------


## wmfinance

OP, great thread btw!  I've been trying to get started with VBA myself and was wondering the same thing.

Since I have literally zero experience in VBA, could some of you recommend some books for us VBA noobs that you have found helpful?  Something that really takes you step by step would be great...

----------


## royUK

There's a whole post of useful links here and here

----------


## wmfinance

Thanks a bunch Roy!

----------

