this post was submitted on 17 Jan 2025
717 points (98.9% liked)

Programmer Humor

20010 readers
1088 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 16 points 2 days ago (2 children)

On Error Resume Next

Visual Basic is a beautiful language

[–] [email protected] 1 points 1 day ago

I legitimately use this line in one of my scripts because range.find returns an error of the value is not found. The use case is taking a 2d matrix saved as an array, with data collected from multiple excel tabs and rearranging it for a CSV upload into Salesforce. The initial array contains values that the rest of the data does not have, so when I search for a non existent value, I can skip the error.

Of course vba COULD just implement try/catch statements and that'd be so much cleaner, but alas.

[–] [email protected] 5 points 2 days ago
On error goto 0 

Was always syntacticly confusing for me.