Serving the Quantitative Finance Community

 
User avatar
applet
Topic Author
Posts: 0
Joined: December 11th, 2001, 1:58 am

any VBA books ?

April 16th, 2002, 1:58 am

hi all,i use c/c++ before and wanna develop some small tool with excel, anyone can recommend some good VBA book for learning VBA programming?? VERY THANKS!!
 
User avatar
PinballWizard
Posts: 4
Joined: March 13th, 2002, 4:36 pm

any VBA books ?

April 16th, 2002, 2:11 pm

Hi appletMy favourite is John Walkenbach's "Excel 2000 (XP) Power Programming with VBA" from IDG Books. It gives good coverage of the Excel object model, VBA syntax, interaction with native Excel functionality etc.One book I do not recommend is Wrox Press's "Excel 2000 VBA Programmer's Reference" - it is literally a mixed-up copy of the Excel help file, with a terrible index and little value-added information.Cheers,B.
 
User avatar
Charlie
Posts: 0
Joined: February 7th, 2002, 8:51 am

any VBA books ?

April 17th, 2002, 10:56 am

hi applet.i come from a c++ programming background. Contrary to pinball wizard would recommend Excel 2000 VBA Programmers Reference by Wrox (Green et al.) as a book, but not to start off with. It has the complete object model for excel letting you get down to the nitty gritty. Pinball Wizard is correct though in saying that this is all available in Excel (in the object browser) and that it is definetly a reference book, rather than a teaching book. (i.e. get it when you want to have some fun, rather than to learn VBA!) It is also more about writing automated tasks in excel than doing financial calculations (e.g. it will help you to write something that automatically plots a graph, for instance). As for learning VBA: 1) the basic syntax is fairly easy ...Function FuncA( x, y, z)' comments are like this!! (i.e. with ' before the line). Dim a, b, c FuncA = a*x + b*y +c*zEnd Functionyou assign the result to the function name to return it. the Dim keyword allocated memory for the variable, which in this case are all VARIANT. You can optimise it a bitby either "as double" or "#" --> so C++ "int x;" is declared "Dim x%" or "Dim x as integer" and "double y;" becomes "Dim y#" or "Dim y as double"That is the guts of it. Press F2 to see the object browser. You can search for functions. Some, e.g. NormDist, have to be accessed thus:WorkSheetFunction.NormDistAnd you can call your new function FuncA from the worksheet. I think if you have a go then your C++ background will come into play and you will pick things up very quickly.2) Advanced modelling in finance using Excel and VBA by Mary Jackson & Mike Staunton introduces financial applications of Excel VBA and introduces you to the VBA you need. 3) Read any introduction to VBA. Most of these books will be looking at all the stuff in the Green book (above) which for financial maths you don't really need. I used the help files and also Writing Excel Macros by Steven Roman (O'Reilly). This book aint financial though! (If you want a VBA add-in with funky dialog which automatically prduces a graph, then these are the skills that you need. )
 
User avatar
spursfan
Posts: 2
Joined: October 7th, 2001, 3:43 pm

any VBA books ?

April 17th, 2002, 10:57 am

i thought i'd take you out of your miserywhilst the walkenbach tome is weightly and somewhat interesting, it stops just when it gets interesting (there's a handful of user-defined functions)if you look at our book (advanced modelling in finance using excel and vba by mike staunton and mary jackson) on the other hand you'll see lots of vba and excel spreadsheets with applications across finance (the distinguishing factor is our preference for writing user-defined functions instead of mere macros)
 
User avatar
Paul
Posts: 7047
Joined: July 20th, 2001, 3:28 pm

any VBA books ?

April 17th, 2002, 11:21 am

Here you go...<a href="javascript:WinOpen('http://books.global-investor.com/pages/ ... &BookCode= 13742 ', 'menubar,toolbar,directories,status,scrollbars,resizable,width=775,height=420,left=50,top=50');"> Advanced Modelling in Finance Using Excel and VBA by Mary Jackson and Mike Staunton <a>P
 
User avatar
markfd
Posts: 0
Joined: February 25th, 2002, 4:22 pm

any VBA books ?

July 5th, 2002, 7:31 am

Can anybody offer a comparison between the two Wrox books on using Excel 2000 VBA and Excel 2002 VBA? Does the latter dominate the former?
 
User avatar
spursfan
Posts: 2
Joined: October 7th, 2001, 3:43 pm

any VBA books ?

July 5th, 2002, 7:41 am

not necessarily, since there's a lot of common material and no major changes in excel between 2000 and 2002the 2002 wrox book is also more expensive so i'd upgrade only if you need material in the couple of new chapters such as writing COM files in VB that can be used in excel
 
User avatar
Onuk

any VBA books ?

July 5th, 2002, 8:40 am

Why bother? (Question not comment).I hate VB, and not from lack of trying it. It depends on what you want to achieve, but you can most likely do it with minimal VB (what you can get from the help) and do the rest in C++. This way you avoid a pointless learning curve, agony of poor design of VB, and get speedier performance. Therefore I always try to avoid it. Does anyone have a compelling reason for VB?PinBallWizard << I guess this holds even stronger now that C# is on the scene?
 
User avatar
markfd
Posts: 0
Joined: February 25th, 2002, 4:22 pm

any VBA books ?

July 5th, 2002, 9:04 am

I've been following the C#/VB debate etc but I assume (perhaps incorrectly) that you still need something to tell you how to do the Excel links?
 
User avatar
PinballWizard
Posts: 4
Joined: March 13th, 2002, 4:36 pm

any VBA books ?

July 5th, 2002, 1:34 pm

Onuk, markfd,In this case, applet may as well learn some VBA - if only to control the Excel GUI. If C/C++ is what you are most comfortable with, then sure, code as much as you can with it but don't hesitate to use VBA to manipulate the Excel objects.I do most of my programming in VB/VBA, however I do understand and agree completely with the attraction of C++, C# and Java in terms of syntax/style/oop and power. VBA makes it very easy to write very sloppy (sp?) code and I try very hard to code well.. from time-to-time I just have to immerse myself in a strictly OOP language!(I do hope that somehow, the next version of Office will be closely integrated with .NET so as to allow us to use C# ... I just wonder how that can happen without an almost complete rewrite of the product though)
 
User avatar
kaikow
Posts: 0
Joined: October 22nd, 2002, 3:04 pm

any VBA books ?

October 23rd, 2002, 5:41 pm

You should get the Excel 2002 version of John Walkenbach's book.He also has a book on Excel functions, and a book on Excel Charts is due next month.I agree with the comment about the Wrox Excel 2000 book.It is my understanding that there is an Excel 2002 edition for the Wrox book, but I have not seen it.In order to more fully understand VBA, it is best to also get some VB books, and generic VBA, not app specific, VBA books. Here is a list of relevant books with some comments on each.
Last edited by kaikow on October 22nd, 2002, 10:00 pm, edited 1 time in total.
 
User avatar
dc
Posts: 0
Joined: January 8th, 2002, 8:52 pm

any VBA books ?

October 24th, 2002, 11:42 am

For a discussion of VBA books, you should take a look at this previous thread Jackson/Staunton excel vba book. I like the VBA for Modelers text. You also might consider OzGrid if it is a tutorial you need.
 
User avatar
mckenzieg1
Posts: 0
Joined: June 3rd, 2002, 6:35 pm

any VBA books ?

October 28th, 2002, 9:01 pm

Get a copy of Lomax's "VB & VBA In a Nutshell". Quite inexpensive, and a great reference. (As a bonus, the six introductory chapters make a pretty good refresher tutorial for someone who knows how to program already.) It won't tell you anything about the Excel object model, but the built-in help (get used to hitting 'F1' - you'll be doing it a lot) and judicious use of the macro recorder will cover that rather well. I own Walkenbach's and Kofler's Excel VBA books as well, but they sit on the shelf, and Lomax gets pulled down again and again...
 
User avatar
Aika
Posts: 0
Joined: May 11th, 2002, 8:29 pm

any VBA books ?

October 29th, 2002, 5:40 pm

Knowing that Staunton visits this forum, I would like to thank him for the excellent book on Excel VBA. It has been very useful for me. It is ideal for somebody with finance background who wants to get up to speed with VBA quickly. It is amazing how you don't really need to write those programmes once you are comfortable with user-defined functions!
 
User avatar
J
Posts: 1
Joined: November 1st, 2001, 12:53 am

any VBA books ?

August 16th, 2003, 5:24 pm

Which one of the following books should be read first for a beginner?1. Advanced Modeling in Finance using Excel and VBA2. VBA for modeler3. John Walkenbach's "Excel 2000 (XP) Power Programming with VBA"