Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel VBA Troubleshooting Question 1

Status
Not open for further replies.

kc27

Technical User
Sep 10, 2008
171
US
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.

ap9error_t8ljat.gif
 
If your application has no VBA code in it itself then it doesn't remember any references that you add to it. Solution is to add any VBA you like to your application, e.g. an empty sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top