Member Login

Login
No account yet? Register
 

Search GeoPrac

GeotechSearch.com

Site Sponsors

Even More News and Blog Posts!

New on GeoPrac.net, the Other News and Blogs page has had a major facelift. To supplement our regular GeoNews and Articles, we aggregate news feeds and blog entries from all over the web into one easy to browse source. Check it out!  

Become an Author

GeoPrac.net is a community site, we are only as good as the content our members contribute!

Whether it's a one time contribution, or a monthly or quarterly article, please consider becoming an author

Subscribe by Email

Subscribe to GeoPrac.net Headlines by Email. Powered by FeedBurner.com, Don't forget to follow instructions to verify your subscription!

Enter your email address:

RSS Feeds

To subscribe to GeoPrac.net headlines, use one of the buttons below. Or view other available feeds or read more about RSS.

GeotechSearch.com Most Popular Search Terms

Home arrow Articles arrow VBA and Excel for Engineers and Scientists
VBA and Excel for Engineers and Scientists - VBA Introduction Print E-mail
Written by Randy Post   
Thursday, 05 April 2007
Article Index
VBA Introduction
Getting Started
Your First VBA Code!
Digg!Reddit!
Del.icio.us!Google!
Facebook!Slashdot!
Technorati!StumbleUpon!
Newsvine!Furl!
Yahoo!Ma.gnolia!

Visual Basic for Applications or VBA used in conjunction with Microsoft Excel is a tool that many scientists and engineers have yet to take full advantage of. This article is the first in a series designed to provide you with the basic understanding of how to use VBA and Excel in your practice. 

So you wanna be a programmer?

How many of you had a programming class in school? Depending on how long it’s been, you might vaguely remember learning C on a mainframe, Fortran with punchcards, or binary calculations with vacuum tubes J.

But one thing many engineers and scientists have found out, is that programming in most languages means you are usually limited to a relatively simple input/output interfaces with text files, etc. Of course a professional programmer has no trouble with generating nicer GUI interfaces, but who has the time or money for that? And don’t forget that often times an expensive complier is needed and the compiled code may or may not run on other machines.

In today’s business environment, most companies utilize the Microsoft Office suite of which Excel is a part of. You can extend Excel using the Visual Basic for Applications (VBA) programming language making it an incredibly powerful tool in your practice. Some reasons for using Excel and VBA for your application include:
 

•         Ability to automate repetitive tasks or calculations

•         Implement complex models

•         Perform simulations

•         Simplify complicated mathematical functions

•         Eliminate nested IF statements in functions

•         Readily available programming environment

•         Implement graphical output and display of the data very easily

•         Easy to distribute your code within an XLS file

Although VBA is the name of the programming language we will be discussing, the word “Macro” is frequently used for code written in VBA. However, it usually implies something recorded by Excel’s built-in Macro recording functionality. Frequently the VBA code and Macro code are used almost interchangeably. I can tell you from experience that when you record a Macro, it doesn’t always end up performing the way you want it to

Excel and VBA Family Relatives

If you’re having trouble justifying taking the effort to learn some VBA, you may be interested to know that there are several related flavors and implementations of the language built on the Visual Basic platform. They may not be identical, but you can pick them up much easier because of their familiarity. If you can use the VB/VBA skill set in more than one application, maybe you can justify the effort a little easier.

Visual Basic 6 and VB.net are full programming languages used for creating stand alone executable (EXE) applications. They require the use of separate (and relatively expensive) programming environments and compilers but are useful for creating polished, fully distributable stand-alone applications.

VBScript is the more modern equivalent of the DOS Batch Files. It can come in very handy for some maintenance tasks on your local computer. VBScript is also used for creating web applications on the ASP platform. If you’ve ever visited a website with the .ASP or .ASPX extension, this is the programming language they are using. The drawback to ASP is that it only runs on a Windows-based server.

A number of other software applications use VBA or a flavor of it as well, including; Microsoft Word, Microsoft Access, Microsoft Outlook, AutoCAD, MicroStation and gINT to name a few.



Trackback(0)
Comments (0)add comment

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley

security image
Write the displayed characters


busy
Last Updated ( Monday, 28 January 2008 )
 
< Prev

Site Sponsors

Users Online

No Users Online

Statistics

Members: 126
News: 366
Web Links: 127

GeoPrac.net © 2007 Randy Post unless noted.
Terms of Use | Copyright Info | Privacy Policy | Disclaimer | Sitemap

Other Randy Post Sites: RnRPost.com | NameDrawing.net 

Article Copyright

All content in the ARTICLES section of GeoPrac.net is copyrighted by their authors unless otherwise noted and reproduced here with permission. Refer to the copyright page or the terms of use for more information.