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!

Help with VBA 3

Status
Not open for further replies.

normm

Structural
Jan 29, 2008
74
I have been using Excel for over 8 years and consider myself proficient in using mathematical functions, formulas, graphs,Vlookup etc. But now I am trying to grow more into User defined funtions, Macro, VBA etc. I am looking for some refernces or books where these are discussed in Civil / Structural engineering context. I have seen such books in Accountancy / marketing background. But I am looking specifically Civil / Structural engineering examples. Can anyone help please?
 
Replies continue below

Recommended for you

The theory is still the same - you are just playing with numbers.

You might check over at Tek-Tips.com - a sister site where the computer geeks live.
 
Find the website for Doug (IDS).
Very good stuff there.

=====================================
(2B)+(2B)' ?
 
Thanks for the mentions everyone.

Normm - I don't know of any books specifically related to civil/structural applications, although there are several for general science/engineering. If you find anything good please let us know.

If you have any questions or suggestions for the blog, please leave a comment.



Doug Jenkins
Interactive Design Services
 
Thanks everyone for your valuable comments and suggestions.

My present intention is not just to download some Excel VBA spreadsheets from a source and merely use it, but to build up some experience myself so that I can apply the skill to do my own spreadsheets to suit any situation I come across. From that point, the references that electricpete and avscorreia gave does not help me a grat deal at present. I also found the language used in presentation in that website is not very straightforward but somewhat (unnecessarily) arcane. But it could be just me, as I have to climb a few steps first.

IDS, the reason for me looking for Civil / Structural examples is that I can relate to the problems more quickly. Although I appreciate the methods must be similar in other disciplines. So if you could mention specifically which references in science and engineering, it woill be a great help.

Thanks again, all of you. I am still looking.
 
I doubt that you'll find VBA books tailored towards structural or civil engineering problems. The addressable market is simply too small to make it worthwhile to publish.

You might find some starting points at
The best way to learn is to do. Identify a need and set off to fill it. Ask questions here or at tek-tips.com.
 
Learn the fundamentals from a generic source as mentioned above, then get into recording macros and examine the code. You can learn a ton of good stuff and speed up programming by orders of magnitude.
 
The bottom line is that you should either be able to use an existing spreadsheet, and simply automate, or, you'll find that VBA is not fast enough and you need to write a C-coded math module to do a specific calculation.

Just doing VBA for the sake of VBA is not going to benefit you or any user.

TTFN

FAQ731-376
Chinese prisoner wins Nobel Peace Prize
 
To each his own. vba fills a much wider role in my arsonal than suggested above.

=====================================
(2B)+(2B)' ?
 
The bottom line is that you should either be able to use an existing spreadsheet, and simply automate, or, you'll find that VBA is not fast enough and you need to write a C-coded math module to do a specific calculation.

That's just wrong.

VBA is plenty fast enough for 99% of what you would want to do on a spreadsheet, and it is useful for a great range of problems. Building your own spreadsheets from scratch is also a great way to learn/refresh the basics. I really don't know why people are so negative about it.

normm - I have Excel for Scientists and Engineers by E. Joseph Billo, which is pretty good. It focusses on numerical methods and examples are science related, but there is plenty in there which is useful in any field of engineering.

I'd appreciate it if you could give some more specifics about things on the blog that were hard to follow. I'd like to make it as useful as possible, so I'm happy to have constructive criticism. Some series of posts that you might find useful are:

and the following two posts

and the following posts



Doug Jenkins
Interactive Design Services
 
... Continued, I pressed submit acidentally:

and the linked posts.

Posts forming a series should be linked through hyperlinks either in the text or in the comments. If you can't find a link try searching on part of the post title in the blog search box.

I would be grateful for any feedback.

Doug Jenkins
Interactive Design Services
 
Thanks IDS.
I will spend a little longer time on this site before making comments. It looks there could be some very useful stuff there.
 
yakpol - I have that book and am glad I didn't pay 67 dollars for it. It's not worth much truthfully.

Regards,
Qshake
[pipe]
Eng-Tips Forums:Real Solutions for Real Problems Really Quick.
 
I just happened to come across something I wrote a couple of years ago, which is relevent here:

The basics are covered here:
and following posts cover a lot of the refinements. If you search this blog for UDF and/or VBA you should find a lot of useful information.

Books I can recommend are Excel Power Programming by John Walkenbach and Excel for Engineers and Scientists by Joseph Bilo.

Both are very readable, and don’t assume a huge amount of programming experience.

If I had to pick one web site for reference it would be Chip Pearson’s site:

In summary I’d say the best way to start was:

Pick up the basics of how to get data from the spreadsheet into VBA and back again.

Learn the basics of Basic; data types, control statements, and arrays etc.

Start experimenting with some UDFs and recorded macros.

For general questions you’ll get a better response at one of the discussion groups, but for any questions on anything posted here, feel free to ask here.

"Here" in the quote means my blog, but it equally applies to here Eng-Tips.

Doug Jenkins
Interactive Design Services
 
excel 7.0 permitted calls to external dll's that was nifty!

to accomplish that same trick in modern versions, you must call the dll from a visual basic module. That step makes it available for the spread sheet use.

 
I'm sorry, I haven't read the entire thread so if someone else has made my suggestion, kudos.

If you're on Google or Yahoo, you can get into the Excel with Macros / VBA group pretty easily. I've been reading their daily digest emails for a while now, very informative and helpful. To find them, just do a standard search on their groups pages and type in something resembling "Excel Maros VBA."

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor