TheSwamp

Code Red => VB(A) => Topic started by: jonesy on December 09, 2004, 09:53:14 AM

Title: How to learn
Post by: jonesy on December 09, 2004, 09:53:14 AM
Looking for advice in how to start learning VBA?

Being an ex-lecturer, I am a great believer in having a tutor around to push you and guide you in the right direction, but - and it seems to be a big but (no rude comments please :lol: ) there doesnt seem to be college courses in VBA in the UK.

I am usually quite happy to work from a book, but, sometimes I need an answer NOW, or need to talk something through with someone, and I dont want to talk to a book :?

Is there a distance learning course that anyone knows of to help.

Thanks for any advice
Tracey
Title: How to learn
Post by: Keith™ on December 09, 2004, 10:42:24 AM
Well, you always have us ....

Actually we have been toying with the idea of having courses here..but sometimes things are slow to get started.
Title: How to learn
Post by: jonesy on December 10, 2004, 04:22:23 AM
I would certainly be very interested in a course/ structured learning with assignments in both VBA and lisp.

Also, (this may be a stupid question) but what are the differences between a course in Visual Basic and VBA :oops:

Thanks for any advice and input

Tracey
Title: How to learn
Post by: Keith™ on December 10, 2004, 09:44:30 AM
Well for one, Visual Basic is the base language that VBA is built upon. You may have guessed that VBA is Visual Basic for Applications.

Typically VB applications need to be compiled into executable form for the program to work, while VBA applications rely upon the hosting program to compile at runtime.

The code syntax is basically the same, and most of the commands, objects, properties, and methods are the same. The main difference is that when using VBA, in AutoCAD for example, you automatically have the AutoCAD objects available in the VBA environment and are able to programmatically access those commands, objects, properties and methods, however in VB you must explicitly tell the VB compiler to add a reference to the "object model" for the application you want to interact with.

Forms and controls are a little different as well. The VBA forms when used in VB are referred to as "designers" and VB forms per se' cannot be used in VBA, you can import the VB form controls to VBA and utilize them, but since many of the controls have the same designation, sometimes there are problems, but the controls are effectively the same, only the VB controls have a little more functionality.

There are some other differences, but we could spend all day talking about the differences. They are essentially the same...if you can code VBA pretty good then you can code VB as well.
Title: How to learn
Post by: TR on December 10, 2004, 11:22:02 AM
Keep in mind that by VB Keith means Visual Basic 6. Visual Basic .NET is very different.
Title: How to learn
Post by: dubb on December 10, 2004, 11:55:03 AM
there is a website that has a tutorial already made.....i havent tried it yet but this is probably where im gonna start....check out this link below

http://www.afralisp.com/vba.htm
Title: How to learn
Post by: hyposmurf on December 11, 2004, 11:45:47 AM
Im currently a complete beginner when it comes to VBA and couldnt find many tutorials on the net,that seemed to wrok or were explained well enough.I bought this book called  AutoCAD 204 VBA - A programmer's reference. (http://www.amazon.com/exec/obidos/tg/detail/-/1590592727/qid=1102783333/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/002-5865059-8783237?v=glance&s=books&n=507846)
Title: How to learn
Post by: Jeff_M on December 11, 2004, 04:34:04 PM
Also, Randall over at CadVault.com has classes for Beginners and Intermediate coding. I'm not sure when the next one starts but you could visit there to find out.
When I first started all I did was start reading the help files and playing with the supplied sample code. When I got stuck I'd ask in the newsgroups at Adesk, that is until I found theSwamp and CadVault :) Now I just read and answer questions at those groups......
Title: How to learn
Post by: Keith™ on December 13, 2004, 08:13:46 AM
Quote from: Tim Riley
Keep in mind that by VB Keith means Visual Basic 6. Visual Basic .NET is very different.


You are at least partly correct ... I perhaps should have clarified ...

When I refered to VB I was speaking of Visual Basic as a whole, not specifically VB6. There are many people who are still utilizing VB4 and VB5 ... so as not to confuse, I included them as well. When it comes to .NET that is a completely different animal ... and since I did not mention it, never figured it to be an issue.... remember VisualBasic.NET is more commonly refered to as simply .NET

I will remember to make that more clear in the future.
Title: How to learn
Post by: TR on December 13, 2004, 09:49:55 AM
I wasn't looking for any trouble I just didn't want to see jonesy go out and buy visual basic.net and assume it was just a new version of regular VB.
Title: How to learn
Post by: Keith™ on December 13, 2004, 11:29:43 AM
Oh, you'll get no "trouble" from me .. I was simply acknowledging and reinforcing your comments.
Title: How to learn
Post by: Anonymous on January 22, 2005, 09:03:57 PM
Hey Guys

I am self taught and going on a year doing VBA. If Keith says he will help you out, by all means, take him up on it, he is a very accomplished developer.

I have come across and used a few very good books as well both with AutoCAD and Excel. I happen to like both equaly.

If anyone is interested in a few titles, let me know.

Mark
Title: How to learn
Post by: Anonymous on January 22, 2005, 09:10:55 PM
Keith.

You starting trouble man?   :lol:
Title: How to learn
Post by: dubb on January 25, 2005, 12:01:37 PM
so if i took a class on visual basic.net i wouldnt do a thing for me for autocad?...i was considering taking this course at a community college, but im afraid they would use the visualbasic.net as their basis of teaching
Title: How to learn
Post by: TR on January 25, 2005, 01:16:45 PM
Quote from: dubb
so if i took a class on visual basic.net i wouldnt do a thing for me for autocad?...i was considering taking this course at a community college, but im afraid they would use the visualbasic.net as their basis of teaching


You can use vb.net (or any other dot net language in AutoCAD 2005). Check out the samples and labs for 2005 found here (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=773180).  Run the self extracting executable and the dotnet samples can be found at C:\ObjectARX 2005\samples\dotNet
Title: How to learn
Post by: dubb on January 25, 2005, 01:27:00 PM
thank you very much
Title: How to learn
Post by: TR on January 25, 2005, 01:47:05 PM
No problem. Good luck.