av8tordude
01-21-2012, 01:16 PM
I have a userform (see attached) with the following: cboName, cboYear, and cmdEnter and I used to have tabs named in 4-digit year (i.e. 2010, 2011). The code in the cmdEnter button deletes any sheet tab older than than 3 years from the current year; (in this example, sheet 2010 would be deleted).
I've added names and put parenthesis around the year on each sheet tab [i.e. John Smith (2011), Jane Doe (2011)]
If "John Smith" is selected in cboName and "2012" selected in cboYear, then, delete any sheet older than 2 years with "John Smith name attached (in this case (John Smith (2010) should be deleted).
The only sheets left should be John Smith (2011), Jane Doe (2011), Jane Doe (2010)
Can someone assist with editing this code? Thank you for your help
I've added names and put parenthesis around the year on each sheet tab [i.e. John Smith (2011), Jane Doe (2011)]
If "John Smith" is selected in cboName and "2012" selected in cboYear, then, delete any sheet older than 2 years with "John Smith name attached (in this case (John Smith (2010) should be deleted).
The only sheets left should be John Smith (2011), Jane Doe (2011), Jane Doe (2010)
Can someone assist with editing this code? Thank you for your help