murman01
New member
- Joined
- May 14, 2015
- Messages
- 4
- Reaction score
- 0
- Points
- 0
- Excel Version(s)
- 2016
Hi,
Using Excel 2016, I have a yearly workbook that is broken in to months, quarters, and year-to-date worksheets. At the start of each fiscal year (April to March), I want to give the user the ability to clear all of their data entries in the entire workbook at the click of a single macro-enabled button on the SETUP worksheet. I've also want to give the ability to clear each month or quarter roll-up worksheet's data entry with a macro-enabled button on each worksheet.
The macro for each individual month or quarter roll-up works as expected. The single button on the SETUP worksheet to clear the entire year works on all sheets until it goes to execute the "ClearContents" command for Sheet20 (the chart worksheet). The monthly sheets have different data to be cleared when compared to the quarterly and yearly worksheets; hence, I've used SELECT CASE in Module 1 in Sub ClearEntireYearCells() the "Range("E3:F4"). For some reason, "ClearContents" command doesn't work when "Case "SHEET20"", but yet the same command works on all the other sheets. I've attached the workbook.
I must have spent hours looking for what I'm missing. Any suggestions? I thank you in advance for your help!!
Sheet2 is the setup sheet
Sheet3 to Sheet19 are the monthly and quarterly sheets
Sheet20 is the year-to-date sheet.
Using Excel 2016, I have a yearly workbook that is broken in to months, quarters, and year-to-date worksheets. At the start of each fiscal year (April to March), I want to give the user the ability to clear all of their data entries in the entire workbook at the click of a single macro-enabled button on the SETUP worksheet. I've also want to give the ability to clear each month or quarter roll-up worksheet's data entry with a macro-enabled button on each worksheet.
The macro for each individual month or quarter roll-up works as expected. The single button on the SETUP worksheet to clear the entire year works on all sheets until it goes to execute the "ClearContents" command for Sheet20 (the chart worksheet). The monthly sheets have different data to be cleared when compared to the quarterly and yearly worksheets; hence, I've used SELECT CASE in Module 1 in Sub ClearEntireYearCells() the "Range("E3:F4"). For some reason, "ClearContents" command doesn't work when "Case "SHEET20"", but yet the same command works on all the other sheets. I've attached the workbook.
I must have spent hours looking for what I'm missing. Any suggestions? I thank you in advance for your help!!
Sheet2 is the setup sheet
Sheet3 to Sheet19 are the monthly and quarterly sheets
Sheet20 is the year-to-date sheet.