These codes come in handy for me all of the time - Whenever I need to automatically save a report with the Week Ending Date, or if I need to calculate something from a SQL query that needs a specific date, I chuck one of these codes. I thought it might come in handy for … Continue reading VBA Code for ‘Last Week’s Saturday’ – & other dates!
Tag: Excel
Quickly Comment/Uncomment code in VBA
Unfortunately, there's no shortcut for commenting/uncommenting blocks of code in VBA - but there are a couple of handy buttons you can add to your toolbar to save you from going through and adding/removing apostrophes from every. single. line! Just follow these steps to turn on the toolbar buttons: In your Excel workbook, if you … Continue reading Quickly Comment/Uncomment code in VBA
How to run an SQL Query in Excel with VBA
I've been making a lot of reports and dashboards combining my love of SQL and Excel lately, so I've put together a neat guide of fully customizable, ultra-commented VBA code to show you how to make a VBA Macro do your SQL bidding. Check it out, and let me know what you think in the … Continue reading How to run an SQL Query in Excel with VBA