A couple of years ago, I posted code for selecting a file with VBA. This example demonstrates how to use the file dialog to return a Save-As string. VBA File Dialog Save-As '-------------------------------------------------- ' File Dialog Save-As '-------------------------------------------------- 'NOTE: To use this code, you must reference 'The Microsoft Office 14.0 (or … [Read more...] about Save File With File Dialog In VBA | Access
VBA Export to CSV From SQL With Save-As in Access
Although not as common as exporting to Excel, some projects may have a need to export in .csv format. Here is my solution. VBA Export With User Defined SQL Query This example uses the QueryDef function. Basically, the user passes a SQL query in, the file dialog prompts for where to save-as and the export is completed. 'To use file-dialog, you must add a reference 'to … [Read more...] about VBA Export to CSV From SQL With Save-As in Access
Download Outlook Calendar VBA Example
Wow time is flying! Looks like my last post was in June! I built this example due to frustration. I was trying to find a way to look at and manipulate appointments in my Outlook calendar for a three month time span. The tool that I built, ultimately loaded the pulled outlook calendar items into a table. I decided not to include that part in this article as it is pretty … [Read more...] about Download Outlook Calendar VBA Example
Create a Folder For Every Tuesday for One Year
I honestly have no idea how much traffic this article is going to get. I wanted to post it simply because I thought it was neat. This script was designed to automatically generate a folder name of 'mmddyyyy' for every Tuesday date of a year that a user inputs. This script can be copied and pasted into notepad and saved to where the folders need to be generated with a filename … [Read more...] about Create a Folder For Every Tuesday for One Year
How to Find Fourth Thursday of November in VBA
I recently built a project where I had to count business days by excluding weekends and US Federal holidays. In my previous post: , my example used hard-coded dates. This new example can be adapted and re-coded to find the date of any specific weekday or holiday of the year without the need to hard-code. Public Function dThanksgiving(curDate As Date) As Date 'Define … [Read more...] about How to Find Fourth Thursday of November in VBA