Best Way to Get into VBA

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
hello,
For me, lots of practice & an excellent book was fastest + best.
For you it may be different - likely though is that lots of hands on coding is part of the answer.
regards, Fazza
 
Upvote 0
This site is pretty good. Just look for VBA posts, you'll usually see snippets of code that doesn't work and see how it got fixed. if you don't understand why the fix worked ask on the post. Real-life scenarios are the best way to learn, also you'll see how people went about diagnosing the problem.

You can't learn from a book really, a book is handy when you've a bit of understanding (I used john Walkenbach's excellent book back in 2003). Tutorials on a website are ok but they're usually very simple and don't reflect the crazy things you have to do in real life. attended courses ditto, plus you'll have forgotten it a few days later as it's a massive information overload if there's substantial content.

Also, think of a project of your own. I wanted to learn how to use Regis graphics on a Mumps platform to create a windows-style interface for out corporate platform, so I wrote a game of Tetris (this is a long time ago!). It took me a month to figure it out but I got it working and I learnt everything I needed to do the windows interFace. I also go banned from playing it as it overloaded the VAX cpu during year-end processing doing a thousand mouse reads a second ha ha.
 
Upvote 0
Great comments, Johnny. I also used John Walkenbach's excellent book. For me, the version for Excel 2000.

I also go banned from playing it as it overloaded the VAX cpu during year-end processing doing a thousand mouse reads a second ha ha.
Beautiful. :-)
 
Upvote 0
I find that if you can access your university and attend the correct classes, it's an efficient way to learn VBA.
 
Upvote 0
Also, think of a project of your own.
I think that is far and away the best way to learn. Find a problem that would be fulfilling to solve, and then use any combination of Help, books, forums, and the many available websites to resolve obstacles one by one.

Rather than reading about 29 ways to reference ranges and wondering when you would use one vs another, "just in time" learning gives you practical examples. By and by, you see situations where each is appropriate, and sense emerges.
 
Upvote 0
I think that is far and away the best way to learn. Find a problem that would be fulfilling to solve, and then use any combination of Help, books, forums, and the many available websites to resolve obstacles one by one.

Rather than reading about 29 ways to reference ranges and wondering when you would use one vs another, "just in time" learning gives you practical examples. By and by, you see situations where each is appropriate, and sense emerges.

I had used VBA for a long time but just for tiny things, macros to do things quicker than via menus such as formatting cells.
I got a job where each day I had to be in at 8am and spend an hour doing a report that had to go out at 9am. it was repetetive, boring, and had to be done at high speed which meant I had hardly any time to check it. I knew could speed it up with VBA, but just didn't know how as my VBA knowledge was very limited. So I bought the John Walkenbach book, and read it cover to cover. Very little of it sunk in, but at least I knew wht was in there. So I set around automating the report production. First load some text files in - there were too big to copy and paste due to the number of blank lines so I figured out reading it in line by line and parsing it to create a manageable input file that could be copied and pasted. Then I automated the checking side. New products could appear in the report without notice and these needed building into the report, which was quick to do once it was spotted. There were about 600 subtotals and totals that could be compared so I made a sheet that compared them all which made new products simple to spot. Finally it got emailed out, so I thought what the heck I may as well automate that. I got it so I could click one button, it would load the input files, process them, check there were no errors and email itself out, start to finish 5 mins vs the 1 hour manual option.

When I was happy with it, I rolled in one day at 8.45. Everyone else was busy doing their manual reports. I logged on, hit the button and the report went out at 8.55, 5 mins before everyone elses. My boss, having noticed my lateness came over and telling me I should have been in at 8 to get the report out and it would be late. "Check your inbox" I said, "It went out at 8.55, and every single subtotal was cross checked".

So, not only did I learn to use VBA, but I got an extra 45mins in bed each morning.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top