[Cheatsheet] VBA String Functions

Function What Does it do? Example Result Len(str) Returns the length of the string Len(“Hello”) 5 Ucase(str) Changes the string to upper case Ucase(“Hello”) HELLO Lcase(str) Changes the string to lower case Lcase(“Hello”) hello Left(str, num) Shorten the string from the left Left(“Hello”,3) Hel Right(str, num) Shorten the string from the right Right(“Hello”,3) llo Mid(str, … Continue reading “[Cheatsheet] VBA String Functions”

Simple Regular Expression Tutorial for Excel VBA

I’ll go through a simple tutorial for using regular expressions for VBA.  This is a great quick start guide for people who have used regular expressions before in other languages.  Just as a review, regular expressions are used to match patterns in strings.  This is a powerful tool that can help you data cleanse and … Continue reading “Simple Regular Expression Tutorial for Excel VBA”

Basic Regular Expression Patterns for Beginners

This is super simplified, but it’s enough to get started with. I remember being confused by the gigantic tables with all the special clauses, so when you’re beginning keep it simple. Remember if you want to match a literal character you can just type it out, unless there’s a special character. Special characters have meanings … Continue reading “Basic Regular Expression Patterns for Beginners”

Get Visual Basic 2010 Express to query an Oracle database

So one of the limitations of Visual Basic 2010 Express is that you can only add data sources to link or query Microsoft databases such as an Access database or MsSQL. So if you need to query an Oracle or mySQL database, for example, it seems that you’re out of luck unless you upgrade to … Continue reading “Get Visual Basic 2010 Express to query an Oracle database”

Access Tips: Watch out for case senstitive situations

I just spent like 2 hours trying to get a query with like 3 levels of sub-queries that I built in a sandbox with copied tables in Microsoft Access to work under a live ODBC linked connection with an Oracle database. Guess what broke my query? 3 references to a user input form that were … Continue reading “Access Tips: Watch out for case senstitive situations”