Results 1 to 9 of 9

Thread: VB vs. VBA

  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VB vs. VBA

    Greetings!

    Out of curiousity, would one benefit from learning VBA before attempting VB? or is it better the other way around?

    And, Are they virtually the same? I realize that VBA is application specific, but can any tools learned there be expanded to VB?

    Thanks!

    Drk.
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VB vs. VBA

    Are you trying to start a war?[img]/w3timages/icons/grin.gif[/img] According to O'Reilly's VB and VBA in a Nutshell, VBA is the "language" portion of VB, but I've heard a lot of argument about that.

    VBA differs based on the application engine it runs in, and since VB IS an application engine, VB's version of VBA is different from the rest. I personally think that Access VBA is the most similar to VB, in spite of the fact that Access forms are totally different from Microsoft forms. I don't think it matters too much which way you go, but if you intend to work primarily in one or two applications, start with them rather than with VB. It isn't hard to pick up VB once you've become proficient in VBA.
    Charlotte

  3. #3
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VB vs. VBA

    DrkRealm:

    Charlotte wrote:
    >but if you intend to work primarily in one or two applications, start with them rather than with VB. It isn't hard to pick up VB once you've become proficient in VBA.

    I Strongly agree!

    It looks as if you've had to deal with Excel problems, and you're starting to get a handle on what Excel VBA is about. Stick with it, and learn what you can. Of course, there's a lot of things which apply just to Excel, but that's cool.

    Keep your ear to the ground, and try ro find out what requirements your company might have.

    I think the reason there isn't more VBA out there (in Word and Excel anyway) is that many people just don't realise what VBA can do.

    A user today was surprised that in Word, I can write out more than one sequential file, based on input to a form. That data will be used as input to another program- data which has been manually entred from Word documents previously just because nobody realsied it could be done automatically.

    Also keep your eyes out for the possibilities. Sometimes you just nee dnew ideas to keep going forward.

    VB is very much similar to VBA- the language is almost the same, but some commands or functions might noit be avialble to you- or there may be more.

    There's also a huge number of "add-ins" which can be attached to VB (theoretically to VBA as well- but when you're getting into high-strewngth applications, VB probably has the performance edge). This also leads to potential distribution problems, etc.

    Sorry for going on so much.

    But even before you consider anything else, spend some time mastering what you're using right now.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VB vs. VBA

    If you intend to do serious programming, then you are better off learning VB first.

    VBA is, in effect, the "core" common subset of VB.
    However, NONE of the VBA books I have seen have adequate coverage of many important areas. I rely on VB books to learn how to do certain things in VBA because Microsoft's documentation is so inadequate and the VBA books are so watered down, ...!

    I would suggest starting with a book such as Gary Cornell's Visual Basic 6 from the Ground Up. That book is useful both as a learning tool and as a reference.

    You would also need the VB 6 Programmer's Guide and the Office 2000 VB Programmer's Guide.

    Before getting Office 97, I purchased the VB 5 Learning Edition. It was an inexpensive way to learn VB before moving on to VBA in Office 97, as VBA in Office 97 is based on VB 5.

    Now, you would purchase the VB 6 Learning edition, as VBA in Office 2000 is based on VB 6.

    The time spent learning VB will pay off many times over in easing the VBA learning/coding tasks.

    Note, as I understand it, Office XP will have VBA 6.3, so VBA will still be available in Office XP.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VB vs. VBA

    Howard,

    Define "serious" programming. I'm completely serious about building Access applications, but I'm much less serious about fiddling around in VB because I don't have any particular reason to do so. I get paid a respectable salary to build databases. If I needed an executable app or was doing something that was totally non-database related, I'd use VB; but I see no reason to use a chisel to drive nails! [img]/w3timages/icons/grin.gif[/img]
    Charlotte

  6. #6
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VB vs. VBA

    The answer is YES.

    I happen to have got started in Word97/VBA and had no problems migrating to VB6 at a later date. By then I had learned the "tricks" of using a VBE (such as the run-time debugging facilities, composition of lines of code etc) and had a pretty good idea of how to search help files, properties & methods and so on.

    When I moved to my first VB6 project I took my Utils.dot with me and made heavy use of my string-processing library routines.

    When I moved back to VBA I brought with me some DAO routines!

    I have sinced wandered off into Access97/VBA and Excel97/VBA. One is usually required to learn a few high-level elements (Excel doesn't have Documents, Word doesn't have spreadsheets), but after that, I'm building, or better still, re-using, procedures that handle strings, numbers, GUI forms, procedures that loop with FOR/NEXT, WHILE/WEND and so on.

    I think of VB6 and VBA as dialects of the same language.

  7. #7
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VB vs. VBA

    Hey all, thanks for the opinions! Some very helpful information indeed! I've spent time on Excel VBA and Access VBA, (of which, excel has been the most recent..) It's been something trying to get Excel to look/feel/act like Access! [img]/w3timages/icons/dizzy.gif[/img] I know I can always rely on great help here if I ever need it, and that helps out ALOT!

    I think I will become more proficient in Office VBA before proceeding to VB, to me, Office VBA supplies a clear end-result, and clearer cause and effect. Although you are achieving something in VB, I would think that it takes a bit more code to make things work as you'd like them to.

    Thanks again for all the input!

    Drk.
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  8. #8
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VB vs. VBA

    "serious programming" applies to VBA too.
    It is far easier to learn the core programming aspects of VBA by reading a good VB book. This only because the VBA books are, at least for those I've seen, ALL serious lacking in depth of discussion, i.e., they are more mass market oriented than the VB books.

  9. #9
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VB vs. VBA

    Actually, I wouldn't call the Access Developer's Handbook light reading at 3000+ pages and 2 volumes. That's about as serious as you can get! The accompanying VB Language Developer's Handbook is a paltry 1000 or so pages.

    As far as concepts go, the VB books I've seen (with the exception of the above) tend to start out by building forms and putting some code in to manipulate them. There isn't any significant difference between the "learn VB in 24 hours" type of book and the "master VBA in 24 hours" type. Programming concepts seem to take a back seat to interface how to. And the database concepts and object-oriented concepts in most VB books are even worse than those in the lighter VBA books. I cringe when I have to look at a VB database app, because, in my experience, there are far more VB programmers who don't really understand database design and object-oriented programming techniques than there are those who do.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •