Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Good Introduction to Visual Basic in Excel

Status
Not open for further replies.

drt

Geotechnical
Mar 15, 2002
13
I've been an Excel user for the last 10 years or so and I am just getting into recording macros and now i want to begin to understand visual basic. Just wondering what is considered the best introduction to visual basic.
 
Replies continue below

Recommended for you

drt,

recommend starting in small steps and then progressing. any literature by john walkenbach, steven bullen, or microsoft (although limited in information) is helpful. john walkenbach and steven bullen have there own web pages with useful tips and vba code examples. within google-groups, there is a wealth of posts regarding excel+vba by some "experts" or competent people.

the macro recorder is helpful is learning how code is created, but understand that once recorded, the exact steps will be repeated. try recording a macro that simply copies and pastes data or formatting a cell (or range of cells).
creating custom functions that are globally available, hence simplify certain computations are useful!

be certain that the information you get pertains to the version of excel you have.

for me, i attended corporate sponsored week-long training seminar for vba in 1994 or so, which prompted me to pursue vba more at the time. perhaps a seminar being held in your local area is available.
good luck!
-pmover
 
drt,

In my case, I started out learning VB (just for my own interest) before I ever used VBA in excel. For myself I found that just learning VB went a long way in using VBA because I didn't have to stuggle with the code writing in addition to how to work with Excels objects. At any rate, the book that has served me well when I needed it is:

"Microsoft Excel VBA 2000 Programming" by Julitta Korol (Wordware Publishing Inc.) ISBN 1-55622-703-5

 
First, I'm not a programmer, but I have written a lot of VBA code to make my life simpler. I went with the trial and error method, using the online help (the paper clip) and the internet. I took one FORTRAN class in college so I was vaguely familiar with setting up code and declaring variables and some other basics--the only good thing to come out of that class. For the most part I still use the macro recorder and try to figure out what the code is doing. Just turn the recorder on and see what happens if you move the cursor one cell or select file>print or insert text, etc.

Other great places for help are the Microsoft newsgroups. Search for "excel [your problem]" on under the groups section and you'll be flooded with information. Another site I like is And the Knowledge Base at And hundreds more. That's probably enough to get you started and confuse you a bit. Then come back with more questions!

Patrick
 
drt:

I started fooling around with VBA by using the macro recorder. Sooner or later, however, you're going to figure out that it's only good for certain programs. The most helpful guide I have is Microsoft Excel 2000 Power Programing with VBA by John Walkenbach. The web is also a good source of information.

Good Luck!

jproj
 
A good one is "Writing Excel Macros" by Steven Roman, published by O'Reilly. I purchased it specifically for information on how to work with ActiveX. The book is good and written, it seems, with engineers and scientists in mind.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor