Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Getting Started

Status
Not open for further replies.

ml13

Structural
Feb 18, 2003
50
Greetings.
We are structural engineers and have spent years of writing spreadsheets to do many of our routine calculations. We think we are interested in programming in Visual Basic, but don't know where to get started, if at all.
Questions:
1. What are some pros and cons for VB, especially for new users who have a (more than) full-time job at engineering?
2. What are some resources if we do decide to get started (websites, books, etc.)?

Many thanks.
 
Replies continue below

Recommended for you

Hello,

We are mechanical engineers and have spreadsheets for routine calculations and we were interested in VB.

I was sent on a City & Guilds course in VB, one evening a week. This gave good background knowledge of VB. (I had already done BASIC programming at school, which helped).

This was a good start.

Pros
You've learnt something new

Cons
If you don't use it a lot you may start to forget the commands.



----------------------------------
Hope this helps.
----------------------------------

maybe only a drafter
but the best user at this company!
 
I was in the same boat you are in. I'm a full time ME that needed to automate a lot of routines and I got into programming in VB6.

All in all I think VB is very easy to learn. I admittedly went thru quite a number of books to get all of the info I was looking for. Believe it or not, I found Microsoft's "Mastering Visual Basic-Fundamentals" and the follow up on developing two of the better books I came across. If you go VB I also would say to make absolutely sure you get MSDN for help. I use it constantly.

One thing I didn't get to look at was a new version of FORTRAN. I used FORTRAN '77 in college and thought it was very easy to program as well. I wouldn't count that out as well.
 
Remember that when you code in VB whoever runs the program has no idea of the program logic. They input the data in text boxes, or from pre-defined lists but have no idea what happens to it when they press the "GO" button!

With a spreadsheet they can trace what happens to the data and some people are happier that way.
 
Sometimes it can be easier to use something like Mathcad. It gives you a full document interface, and all the equations etc can be visible and live, which is much easier for checking, it understands units, so unit consistency can be ensured, and at the end of it you have document that looks like it came from a wordprocessor. Users, auditors, the guy picking it up 6 months after you got run over by a bus, all have a chance of finding the errors quickly and easily.

VB, VBA, Excel etc all suffer from the shortcomings of having to do all the messy formatting yourself, and it is virtually impossible to be sure that the equation you put in is exactly what you intended. In Mathcad WYSIWYG (to coin a phrase). You end up with all kinds of maintenance headaches in the future.




Bung
Life is non-linear...
 
One of the best ways to learn VBA is to use the macro recorder in Excel.

Enable the Visual Basic toolbar. Turn on the macro recorder and perform a series of operations that you might want to encapsulate. Click the Stop recording button

The, click the Visual Basic Editor button. Click on the Modules folder in the Project Explorer window on the left. Then double-click Module1 and your recorded macro should appear in the edit window on the right.

TTFN
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor