Create A New or Open an Existing Excel File Every Month
Category:Files and Directories
Version Compatibility: Visual Basic 6
This example will work for Excel 10 (OfficeXP) and Office 2003. The application either opens an existing Excel file, or creates one if it does not exist, and then writes data. The file name is formatted as month_year, such as 08_2005.xls. Column widths are set, 1st row text is turned bold and the new or existing file is then saved.
Instructions: Copy the declarations and code below and paste directly into your VB project.