Actuarial Outpost

Actuarial Outpost (
-   Software & Technology (
-   -   Best way to learn VBA. (

campbell 11-08-2007 03:08 PM


Originally Posted by Former Actuarial (Post 2443701)
i need to learn VBA for real now. i've gotten away with looking at previous code and manipulating it for my needs. but now i really need to learn it and use it. i'm gonna pick up Excel VBA Programming For Dummies by Walkenbach tonight. It's a 2004 maybe there's something more current from him. i'm sure this one is fine if there isn't.

I'm using the 2004 version of his book, which I think is good enough if you're not using Excel 2007.

anywhereman_nyc 11-08-2007 03:21 PM

Try also 'Microsoft Office Excel 2003 Power Programming' or 'Microsoft Office Excel 2007 Power Programming' by the same author.

2003/2004 books should be sufficient if you are not working with Excel 2007 / MS Vista.

When you get comfortable with VBA, proceed with the book by Francesco Balena (ISBN: 0735621837) on VB.NET 2005 / .NET Framework 2.0 --> if you have never dealt with C++ / Java, it is a natural extension of your VBA track.

Former Actuarial 11-08-2007 03:27 PM

thanks. yeah, we have windows xp and excel 2003

hokie9415 11-16-2007 02:06 PM

I feel like I'm giving away my secret, but I use Google Groups for a lot of my coding knowledge. I like the internet because there are real people out there presenting creative solutions wheras a book is very concrete and structured.

PSUActuary 01-16-2008 01:21 PM

For students taking preliminary exams, the Derivatives Markets textbook used for exams 2 thru 4 has an Appendix (D) that gives some great examples for learning VBA. It starts out showing some very basic functions, such as adding two numbers and activating cells. But then it gets into creating functions for Black-Scholes and Binomial Option Pricing formulas. It is a great way to both learn VBA and better understood the material for the exams.

jindalily 01-20-2008 08:20 PM

I taught myself VBA with MS Access, manipulating records and whatnot. It took me about a day to be able to code with VBA and about a week to create some rather complex programs. This may be because I have a BS in Computer Sci though.

Alto Reed on a Tenor Sax 01-29-2008 10:08 PM


Originally Posted by jindalily (Post 2608723)
I taught myself VBA with MS Access, manipulating records and whatnot. It took me about a day to be able to code with VBA and about a week to create some rather complex programs. This may be because I have a BS in Computer Sci though.

Yeah, I think that just might have helped.

MY$.02 07-05-2008 12:04 PM

Well I started from scratch on vb the book Iused was Starting OUt With Visual basic 2008 By Tony Gaddis

its a good book

Mojo 09-01-2008 02:37 PM

I think for those who have programming experience prior to learning BNA, Macro is actually a great way to learn the syntax and the nuance of the language. One time, I needed to use excel to connect to SQL server and manipulate data . I can already can program in C and knew SQL pretty well, but had no idea how excel sends query. A quick macro recording session showed me how Excel does its thing and give me a template to add more of my codes.

proof by exhaustion 12-24-2008 09:54 AM

Disclaimer: This is in no way a means to learn Excel, but it has helped marginally from time to time. I have mostly used the recorder, prior programming knowledge, and internet forums. Occasionally I will steal my neighbors VBA book as well.

A lot of what I have discovered (in Excel 2000) comes from typing in the beginning of a line of code, say:


and then a little pop up box shows up with all of the various options for what I can type next, including any user defined objects that I have created. This has helped me to find a lot of cool little tricks, especially for some of the spreadsheets that I have created to send to people outside of the actuarial department. Usually I will want these to be as user friendly and, frankly, idiot-proof as possible. An example of something useful I learned here was typing in, say:
then seeing "visible," assuming, "oh this is probably a boolean. I can use this for sheets that I only want the user to be able to see at certain points." Then I'll typically try to type in
sheet1.visible = false
run my code, and see what happens. If it crashes, so be it, but I can always look on the web for a way to use it.

Digressing, I think that most people shy away from using VBA because of some sort of absurdly irrational fear of not knowing how to do something. It is important to take the approach that, if you think excel can do something, it probably can. You just have to be willing to use trial and error and to seek help. I had no prior Excel knowledge a year ago, and I am writing fairly complicated programs, complete with GUI components, mostly from just playing around and generally messing things up. Even though it has been a big time investment, the fruits of my labor are beginning to pay off. If you learn this program, it WILL increase your efficiency at work.
[/Motivational Speech]

All times are GMT -4. The time now is 03:56 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

Page generated in 0.13207 seconds with 9 queries