Archive for May, 2014

Metaprogramming In VBA

Metaprogramming In VBA

I came across an interesting question over at StackOverflow this morning. I thought you all might be interested as well. While I truly don’t recommend running code stored in a spreadsheet, the VBIDE library does allow for more efficient development by writing “snippets” and metaprogramming. Perhaps I’ll do a more in depth write up in the future.

,

1 Comment

The Last Mile – Why Good Enough Isn’t

A few weeks ago I was talking to a particularly good friend of mine. We somehow got on the topic of “good enough” and how it just isn’t. Let me preface this with “I’m guilty”, and I truly am. There’s no way for me to say this without sounding condescending, so please believe me that I don’t mean it to be arrogant. My “good enough” tends to be better than average. This has allowed me to more or less skate through life and let me tell you something, I have not done nearly enough.

Oh sure. I’ve done pretty well. I have a good career, a great family, and the best friends a guy could ask for, but what have I done? The truth is I’ve done a lot, but not nearly as much as I could. Why is this? Because I, like you, am lazy. Of course I’m lazy. I didn’t intentionally become a programmer. I became one because I was lazy. I understood that if I put the effort in up front to build a piece of software to do it for me, I would never have to waste another second doing it by hand again. That’s also the only reason my good enough is better than average. I’m lazy, but I recognize that it’s a better investment to do some extra work up front in order to reduce the overall amount of effort over time.

Read the rest of this entry »

, ,

Leave a comment

VBA ODBC DSN Installer

One of the most common questions we come across as MS Access developers is “How do I make sure every user can access the database?”. Often, and with good reason, a DSN-less connection is the way to go. However, DSN-less connections aren’t for every situation in Access. Sometimes they’re clunky, or some functionality of Access just doesn’t work with a DSN-less connection. I suspect this is because Access was designed specifically to use linked tables, which use a DSN by nature.

I ran across this problem a little while back. While I can’t remember exactly what it was that just wouldn’t work no matter what I tried, I did need a fairly robust solution for manipulating the Domain System Names via VBA. Not only did I need to install them, I needed to fix them when they weren’t set up correctly. So, for my case, a *.reg file just wouldn’t do. I had to code this. Read the rest of this entry »

, , , ,

2 Comments