We have an Excel VBA application that has a custom button on it for users to add a new worksheet to their workbook. One workbook shows this error message when the new worksheet button is clicked: "Compile error: sub or function not defined".
Code is displayed, shown below. I am looking for ideas as to what in this workbook is causing the add worksheet button to fail. Does the error message and the code excerpt offer any clues as to where the problem lies? I am more of an end user, not a programmer, so any advice on what Excel is trying to tell me would be appreciated.
The button works fine on new workbooks or other existing workbooks. It is just this one workbook where it is failing.
Code is displayed, shown below. I am looking for ideas as to what in this workbook is causing the add worksheet button to fail. Does the error message and the code excerpt offer any clues as to where the problem lies? I am more of an end user, not a programmer, so any advice on what Excel is trying to tell me would be appreciated.
The button works fine on new workbooks or other existing workbooks. It is just this one workbook where it is failing.