25
devbf
5y

Wow I hate VBA... What a fucking shitty syntax:

For x in y
...
Next x

If x Then
...
ElseIf y Then
...
End If

While z
...
Wend

WTF even is this? Wend? WTH! Why can't you just use a End While? For fuck sake I hate this language

Comments
  • 7
    😂welcome to hell, on another note - don't become good at it, you'll only have more work to do with it.
  • 7
    VBA is a slippery slope. Get out while you still can.
  • 3
    Haha yeah it's a big pile of shit 😂 but sometimes the faces of colleagues for which you just automated a task which used to take 20 minutes in Excel are worth all the effort ^^
  • 4
    My real issue is (and will always be with) choosing "dim" over 'var'.

    Apparently dim is short for "dimension" and that means a variable. Totally intuitive. /s
  • 12
    @devbf 20 years later...

    ..."Well you see, it started as a way to impress colleagues through automating Excel tasks - then someone knew a consulting house who found my skills incredibly valuable. After that I went off on my own, and that's how I've been a VBA consultant for the last 2 decades."
  • 6
    @wannabe yeah and why the heck do you have to write

    Dim x As Integer

    instead of a simple

    int x

    Such a fucking mess
  • 3
    @devbf run, run far far away. It's a gimick now, it'll become your day job before long.

    If people "know" you can automate their jobs, they'll be paid not to do theirs.
  • 2
    @C0D4 Yeah as soon as VBA takes over more than 5% of my programming tasks I'll leave immideately!
  • 4
    @AlmondSauce I hope in 20 years VBA is dead ^^
  • 0
    Can’t help with the syntax, but rubberduckvba takes the edge off the pain.
  • 1
    at first i thought you meant VBA, the trash GBA emulator, then the code made me think TI-BASIC...
    rollercoaster of emotion.
  • 0
  • 3
    I normally have something good to say about even the most despised languages......but VBA I cannot....

    I worked with classic ASP years ago, and even though I enjoyed that work I would always curse VBScript because most of the things I was doing in it would have been faaaaar simpler to do using php or practically anything else on the server side of things.

    On a good note, not entirely sure about VBA, but the few VBScript or VB.NEt(yes I know they ain't the same, but I am speaking about the family of VB dialects/ pay really friking well if you are willing to sell your soul and sanity.
  • 4
    @devbf I hoped that 20 years ago.
  • 0
    @devbf

    You can automate Excel tasks using pretty much any other programming language.

    For Python there is Openpyxl, for Javascript there is js-xlsx, for Rust there is Calamine, etc.
  • 1
    @bittersweet openpyxl 🥺
    why didn't I stumble upon this before.

    Wait it's up to 2010... 2016 anyone???
  • 3
    Quit tomorrow. Your future self will thank you.
  • 1
    @C0D4 Excel 2010 is just the format version (openxml-based xlsx instead of binary xsl), should work with any office version later than '07.

    Btw as a VB replacement there's also PyXLL, which is not a library to read Excel files, but rather a plug-in for Excel which executes Python code and hooks into the Office C API.

    It allows you to extend Excel using Python, modify the ribbon & context menus using Python & XML, use pandas or tensorflow functions from within worksheets... go crazy.
  • 2
    This is written with WHILE ... WEND

    https://youtube.com/watch/...

    So is this:

    https://youtube.com/watch/...

    So are all of these:

    https://youtube.com/watch/...

    Most people were dwelling in caves when they came up with that syntax. Show a little bit of respect for their ingenuity...
  • 1
    @wannabe Actually, there's no agreement on what it means. Some people say it stands for "declare in memory"
  • 1
    That post was made by C++ brackiets gang.
  • 0
  • 0
    @bittersweet will take a look at that!
  • 2
    @AlgoRythm I went to google to prove you wrong, and cannot. Thank you for making me hate VBA more ;)
  • 1
    @wannabe I wonder where the conclusion that dim means dimension comes from. Went to google, too, but nowhere found something in a official MS documentation. But manyonline blogs explain it that way...
  • 4
    @devbf
    The original keyword was DIMENSION

    Source: myself in 1986
  • 0
    @devbf nah trust me it won’t...
  • 1
    It was designed to be "human readable".
    It might have been... once... a long time ago.
  • 0
    Its fucking cancer
  • 2
    I guess this qualifies as wk194
  • 1
    IMO it wasn't intended as a proper optimized programming language, but more of a way for non-dev roles common in corporate teams to be able to learn and write a small program that does whatever task they have in hand like creating a survey form or porting data across applications.
Add Comment