SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,182
    Mentioned
    67 Post(s)
    Tagged
    2 Thread(s)

    My thoughts on VBA

    I just wanted to take a breather and mention my general dislike for VBA:
    VBA is absolute garbage.
    Thank you for your time. Thoughts?

  2. #2
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    358
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    There's an old saying, "Tis a poor workman who blames his tools".
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon

  3. #3
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Perhaps. Or perhaps it is a wonderfully simple, perhaps too simple, tool for automating office stuff. Hard to know. Why does it suck?

  4. #4
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,182
    Mentioned
    67 Post(s)
    Tagged
    2 Thread(s)
    It is wonderful, sometimes, for work automation. Which is exactly what I'm using it for right now, however, its array handling is absolutely horrible.

    No simple bumping a string to the end of an already existant array in this language. I would actually be very content with it for the automation pieces I can create with it if it were not for short comings of its arrays.

  5. #5
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    358
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Have you tried using a collection object instead of an array? I agree with you that VB arrays are pretty limited.
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon

  6. #6
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Don't ask me, I have this weird mental block where I can't learn "visual" programming. I can hand compile my own x86, z80 and 6502 machine language, and I can't learn visual programming... Hell I'm old school Borland and I can't even get Delphi to work without running DCC from the command line (probably why I'm using FPC without Lazarus)... and it's not the event driven that's messing me up, I can use OWL, GTK -- even make a windows program without any toolkits raw... Something about Visual Programming escapes my comprehension.

    Though Visual and Basic? Basic is a cute toy language; you basically have to turn it into not being basic by shoe-horning in concepts from other languages where they don't actually fit...

    Not a good combination IMHO. That all security lies user-side is just the icing on the stupidity cake.

  7. #7
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    PHP and javascript treat arrays as funny hybrids of arrays, dictionaries, collections and lists. Most statically typed languages treat arrays as fixed-length entities. You want to look at collections.

    AFAIK you can get a much better experience in modern version of office. I'd rather be coding in .NET any day.

    @deathshadow60: I'm not following the security thing, can you explain?

  8. #8
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    @deathshadow60: I'm not following the security thing, can you explain?
    You can inject VBA scripts -- like any other scripting language, into documents that support them and they'll just run with FULL system access. The only way to prevent them from having full access is for the user to disable scripts altogether. It's been the bane of security since vb scripts inside documents came along... this is particularly true in Outlook, since running code from untrusted e-mails? That has FULL system-wide access?

    It even made it onto the page full of truthiness:
    http://en.wikipedia.org/wiki/Visual_...urity_concerns

    Distributing stuff done in VBA is often a problem, as they don't work for more knowledgeable users who turn app scripts off in the first place, and will be extremely unlikely to agree to turn them on just for your one little project. At the same time in many offices there are old 'applications' built with it that means you can't turn it off in things like excel, word or access, leaving those systems with gaping security holes you end up having to use other software to plug up.

    It's one of those cute late 90's ideas before we had truly malicious code out there -- and unfortunately thanks to endless legacy in-house crapplets many businesses rely upon, it keeps lumbering forward like the behemoth that just won't die.

  9. #9
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Gotcha. The oulook hole has long since been closed and it is actually pretty hard to get Word to run your own in-house stuff these days. But it definitely was a problem 10 years ago. It was only really dangerous because of the other late 90s ideas of everybody running as Administrator in some context so any exploit could easily be translated into pwnage.

  10. #10
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,182
    Mentioned
    67 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    AFAIK you can get a much better experience in modern version of office. I'd rather be coding in .NET any day.

    I'd rather not use MS products / languages, but it's what is readily available at my place of work. Hopefully I will have more tools at my disposal soon!


Bookmarks

Posting Permissions

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