ChiChiR
New Member
- Joined
- Feb 9, 2014
- Messages
- 14
I have a large file that was originally developed years ago, in Excel 2003 or maybe earlier. I am currently running Excel 2007 in my office, and the file is currently saved with 2007 in .xlsm format. Many of my users have more recent versions of Excel than we have and are running into problems with pieces of the extensive VBA code that work fine in 2007.
In this particular case, I have a string of 10 Sheets("sheetname").Delete statements. The first few are as follows:
Sheets("FTE ANALYSIS").Delete
Sheets("Supplemental Schedules A & B").Delete
Sheets("School Nurse Schedule C").Delete
The first statement works fine, but users with Excel 2013 are getting the run-time error '1004' Delete method of Worksheet class failed. I thought perhaps it was the ampersand in the sheet name, so I commented out that line. Again, the first one worked, but it errored on the "School Nurse" sheet.
I did some searching and found that someone had a similar issue that was caused by their sheets being VeryHidden, as opposed to just Hidden. My sheets are just Hidden, not VeryHidden, so that is not the issue here.
Does anyone know what is tripping me up? It work in 2007 and 2010 (at least, this piece does), but not in 2013.
Thank you!
Cece
In this particular case, I have a string of 10 Sheets("sheetname").Delete statements. The first few are as follows:
Sheets("FTE ANALYSIS").Delete
Sheets("Supplemental Schedules A & B").Delete
Sheets("School Nurse Schedule C").Delete
The first statement works fine, but users with Excel 2013 are getting the run-time error '1004' Delete method of Worksheet class failed. I thought perhaps it was the ampersand in the sheet name, so I commented out that line. Again, the first one worked, but it errored on the "School Nurse" sheet.
I did some searching and found that someone had a similar issue that was caused by their sheets being VeryHidden, as opposed to just Hidden. My sheets are just Hidden, not VeryHidden, so that is not the issue here.
Does anyone know what is tripping me up? It work in 2007 and 2010 (at least, this piece does), but not in 2013.
Thank you!
Cece