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!

Learning Visual Basic

Status
Not open for further replies.

jmw

Industrial
Jun 27, 2001
7,435
It really is time I was better educated and that I learned how to do things the right and economical way; to become more proficient in Visual basic (there is a limit to what can be done with If statements).

Can anyone recommend any good guides for "Teach yourself VBA"?

Idiot's guides, please, for both Excel and for Visual Basic 10 Express.

And, sooner or later I will need to be able to make these programs into web applications.

Any suggestions?


JMW
 
Replies continue below

Recommended for you

There's probably stuff on the web on Visual basic in general, but the main thing to remember is that VB in Excel can be different to the normal Visual Basic programming stuff. When I've not been sure how to do things in Excel then I record a macro and enter values in cells, use goal seek, etc. and then look at the macro to see what Excel has recorded to learn the syntax that way. Alternatively, look at macros that others have written to see how they'v done it. You can put in breaks (with the F9 key) into the macros to see what changes have been done, and when. Otherwise I've not seen anything written on using VB in excel.

Tara

 
You can "control" Excel from VB. Excel is running "inside" of VB.

VBA is a subset of VB and runs "inside" of Excel providing much of the functionality of VB.

There are plenty of VB and VBA books out there - most are in the 1,000 page range - gives you an idea of what you are up against.

Also, check out TEK-TIPS.com a sister website where the computer geeks live. They have a whole section on VB.
 
VB is just a generic family of languages.

VBScript - for web scripting and OS scripts
VBA - for applications (each with its own dialect)
VB1-6, generally known as VB.
VB.net - yet another front end to .net framework with a VB syntax (others are C#, F#, C++/CLR)

You probably can't use VB1-6 unless you have an old interpreter. VB6 came out in 1998. As for VBA, you need to target a particular application eg Excel, Word, Powerpoint, Access, Outlook etc. Each one has different object types that you need to know about.

The nice thing is that you can use code similar to VBA in VBScript and do things like copying from Access to Word.
 
O'Reilly's Excel Scientific and Engineering Cookbook has a chapter on VBA for Excel. O'Reilly also publishes Writing Excel Macros with VBA and Programming Excel with VBA and .NET.

The Kindle versions of these books cost about half of O'Reilly's digital list price. But O'Reilly regularly has half off, two-for-one, and three-for-one sales that can be a better deal if you're patient. The digital versions from O'Reilly are available in multiple formats without DRM restrictions.

Rob Campbell, PE
 
John Walkenbach's books in the "Dummies" series got me started. Well written, and jargon free. The titles are something along the lines of "Excel VBA Programming for Dummies".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor