Serving the Quantitative Finance Community

 
User avatar
mathmac
Topic Author
Posts: 0
Joined: July 28th, 2002, 1:16 pm

Best way to learn VBA

July 28th, 2002, 9:08 pm

Hi guys,Is anyone here learning VBA from the scratch? What resourses r u using the most? Those who are already familier with VBA, how did u guys learn it? I'm using "Excel 2000 programming"(Sams teach u'rself in 21 days). After I'm done wtih this book, is there any other book that would help me learning VBA? I think I'm asking too much questions here, but I know that u'd be so helpful to new members. MathMac.
 
User avatar
PinballWizard
Posts: 4
Joined: March 13th, 2002, 4:36 pm

Best way to learn VBA

July 29th, 2002, 2:48 am

Hi,You seem to be on the right track. If you are new to Windows programming (as opposed to DOS or command-line programming) then not only do you need to learn the language syntax, but also the graphical environment you are working in. There's a lot to learn and the best thing is to jump right in and trying/modifying sample code as well as writing your own.If you are working in Excel (you probably are), make use of the macro recorder - it offers a great way of investigating the Excel object model.One book I would recommend because it provides quite a comprehensive intro to Excel VBA is John Walkenbach's "Power Programming with Excel VBA" (see reviews on Amazon)There are a number of introductions to financial modeling using Excel VBA (check the 'bookshop' section of this site), however keep in mind that these may not always provide 'robust' programming techniques as the authors are seldom professional programmers.Also, you should definitely make use of Microsoft's MSDN site, which provides a wealth of programming samples, tutorials and other technical material.Lastly - don't forget to surf the 'Software Forum' on this site, I don't know of any better place to get programming advice from people who share the same interest in quantitative finance.Good luck.
 
User avatar
akimon
Posts: 1
Joined: May 28th, 2002, 2:38 pm

Best way to learn VBA

July 29th, 2002, 3:35 am

I bought a book called "VBA for modellers" amazon link. I find it very readable. The first half teach basic syntax and how to use the important objects (also the solver add-in, really useful). The second half of the book is applied to solving optimization problems in management and finance in excel VBA.. very applicable. Plus it's more fun to learn VBA when you are actually programming something relevent than learning syntax (it is really not a "hard" language to learn !).If you really want to learn the language inside and out you should probably also get a complementary Excel VBA reference as well...
 
User avatar
spursfan
Posts: 2
Joined: October 7th, 2001, 3:43 pm

Best way to learn VBA

July 29th, 2002, 7:50 am

to a large degree it also depends what you want to do with vba - both walkenbach and albright concentrate on using vba to automate spreadsheet calculations (using macros) - though one can of course use the macro recorder to get some initial codewhat most books on vba ignore is the ability to write user-defined functions (that can incorporate excel functions but also loops etc) that return numerical values or even matrices - these can then be used in any spreadsheet and easily copiedif you're interested in the latter then an amazon search with mike staunton should pick up our book
 
User avatar
rajagopalp
Posts: 1
Joined: July 14th, 2002, 3:00 am

Best way to learn VBA

July 29th, 2002, 3:17 pm

Hi I found this link on MSDN is very useful for VBA programming which gives enough resources/ links to become an expert in VBA..Check it outhttp://support.microsoft.com/default.aspx?scid=kb;en-us;Q163435--Rajagopal
 
User avatar
effendi
Posts: 0
Joined: March 17th, 2002, 5:00 pm

Best way to learn VBA

July 31st, 2002, 5:59 am

my fav: Excel 2000 VBA by John Green, published by Wrox. A well-balanced book that serves both a how-to guide and reference.
 
User avatar
Ryan
Posts: 0
Joined: April 24th, 2002, 1:22 am

Best way to learn VBA

August 2nd, 2002, 5:31 pm

In the last year I've also had to learn VBA from scratch. The first book I bought was "Excel 200 VBA" by John Green. It was a good start but falls well short of what you need to know to price an option. I found it's coverage on arrays terrible. After about two days with this book I went out and bought "Sams Teach Yourself Visual Basic 6 in 21 Days". Much better. Far broader coverage and much better examples. After working through this I found I still wanted something a little more specific to option modeling so I picked up "Advanced Modeling in Finance using Excel and VBA" by Mary Jackson and Mike Staunton. Best money my company ever spent on a programming book. Using it as a base you can easily extend into pretty much anything. Gives good coverage of equities and fixed income, and teaches you what you need to know from the ground up. (Well done, Spursfan)!The Sams and Jackson-Staunton books are the only two I ever refer to. Ryan
 
User avatar
patch22
Posts: 0
Joined: May 9th, 2002, 7:50 am

Best way to learn VBA

August 11th, 2002, 1:57 pm

I think the fastest way to learn VBA or any language is to learn by example. Beg/borrow/steal as much code as you can from either the web or your colleagues. (Since collaboration is such an effective way to learn anything and reinforces why this website is so useful!)Failing that the best books for financial applications remain:Jackson & StauntonHaugBenninga
 
User avatar
dc
Posts: 0
Joined: January 8th, 2002, 8:52 pm

Best way to learn VBA

August 14th, 2002, 7:35 pm

I like the VBA for Modelers book best. If you want to shell out more cash, there are some online training programs available - such as OzGrid.com.
 
User avatar
PinballWizard
Posts: 4
Joined: March 13th, 2002, 4:36 pm

Best way to learn VBA

August 14th, 2002, 7:42 pm

I agree the VBA for Modelers book is quite good. I've had it for a while but never really took a good look at it.I like the fact that the author has bothered to design relatively complete interfaces (dialog boxes etc.) - so often, for this sort of book, authors concentrate mostly on the numerical stuff and hack together terrible or incomplete GUIs.A good book.
 
User avatar
mckenzieg1
Posts: 0
Joined: June 3rd, 2002, 6:35 pm

Best way to learn VBA

October 28th, 2002, 8:37 pm

If you already have a programming background, then I recommend "VB & VBA In a Nutshell", by Paul Lomax (from O'Reilly's superb 'Nutshell' series, beloved by computer geeks everywhere). It's not a tutorial book (although you will learn a lot reading the six general chapters that precede the reference section), but as a reference it is top notch, and since VBA has a lot of built-in functionality, and differs in various annoying but crucial ways from other languages, you will need a reference. I do a lot of Excel VBA programming these days, and while I have Walkenbach's and Kofler's books, the Nutshell book has been off the shelf far more often than the other two put together.
 
User avatar
Mano

Best way to learn VBA

October 29th, 2002, 8:04 am

Advanced modelling in finance using Excel and VBA by Jackson and StauntonI think this is the best book because it starts from the begining and goes all the way. I learnt things about Excel itself which I never thought it could do. And it is relevant to the field.spursfan is too modest not to mention that he is the authour of the book and playing by Paul's rules about not promoting his book
Last edited by Mano on October 28th, 2002, 11:00 pm, edited 1 time in total.
 
User avatar
J
Posts: 1
Joined: November 1st, 2001, 12:53 am

Best way to learn VBA

October 29th, 2002, 2:26 pm

What is the best way to learn C++ without knowing C?
 
User avatar
patch22
Posts: 0
Joined: May 9th, 2002, 7:50 am

Best way to learn VBA

October 29th, 2002, 6:57 pm

J, try some of the other threads about C++ but for a quick answer "C++ primer+" by Steven prata is highly recommended, as is Odegaard's "Financial Numerical Recipes in C++" also fully referenced elsewhere on this site.
 
User avatar
J
Posts: 1
Joined: November 1st, 2001, 12:53 am

Best way to learn VBA

October 30th, 2002, 12:11 am

pathch22,Is "c++ primer +" easily readable without pain for a beginner without knowing any C & OO language but knowling how do Matlab programming and VBA programming?
Last edited by J on October 29th, 2002, 11:00 pm, edited 1 time in total.