I expected to find more references to the issue had it been something that was a common coding issue.
Multiple sheet naming code issues but those were specific to more elaborate sheet naming problems. I could very well be wrong, however, in all my searching for a solution I have not found a straightforward answer to my problem. I am learning Excel's nuances and it's specific language, but this issue does not feel like a programming error. I understand the logical steps and planning a set of steps in code. I am familiar with the basics of coding from spending time with my son when he was interested in Python and other coding languages. I am trying to learn Excel Intermediate and Advanced skills, and also trying to learn beginner VBA coding which shouldn't be this difficult. What am I doing wrong? Is there a setting in Excel to tell it to name new sheets sequentially by the actual sheets in the workbook that are named Sheet 1, Sheet 2, Sheet 3? From what I can tell from my several days of trying to find my own solution, I could insert 50 sheets and delete every one of them and Excel would name the next inserted sheet "Sheet 51".Īlso, why is my Office365 Excel spitting out error messages from Excel95? I run my macro and get the error, it stopped at select sheet 2, because when it inserted the new sheet the system automatically named the sheet "Sheet3".
I made the macro, deleted the sheet, so now I have a workbook with 1 sheet, named Sheet1. It is a simple enough macro, Insert sheet, select sheet2, rename sheet2, string of numbers, and Expecting Object to be Local When I looked it up online I found it referenced as an Excel95 version of error code. I have run the repair tool twice on my system and still get the same error. I hope someone can help me with this issue because I have spent several days thinking I am missing a crucial piece of information regarding VBA and writing good code.