Error calling macro module from Workbook_NewSheet

Error calling macro module from Workbook_NewSheet

For several years I've used a sheet that calls a macro in a macro module from the ThisWorkbook module under Spreadsheet objects.

Earlier this week I adjusted an unrelated part of the macro module, and the call from the ThisWorkbook module stopped working. It now reports the macro module function as "Undefined function or value", instead of running it. So I set up a very simple test spreadsheet to figure out the problem, and I can't make it work there either.

Here is my test code, which doesn't work right now.

Code in Spreadsheet Objects > ThisWorkbook:

   REM ThisWorkbook Module

   Private Sub Workbook_NewSheet(ByVal sh As Object)
      TestFunction()
   End Sub

Code in Macro Modules > Macro:

   Sub TestFunction()
      ActiveSheet.Cells(1,1).Value = "'Test"
   End Sub

The error reported is "Undefined function or value: TESTFUNCTION" when it is called from Workbook_NewSheet(ByVal sh As Object)

I have also tried putting call in front of TestFunction(), removing the brackets (with or without call), changing the TestFunction() declaration to public, and some other variations as well - but what's here right now (with no call, and with the empty brackets) is what had been working before.

 Where is the problem?
    • Sticky Posts

    • Introducing Forms in Zoho Sheet

      We hereby bring you the power of ​forms in Zoho Sheet. ​Now, build and create your own customized forms using Zoho Sheet. Be it compiling a questionnaire or rolling out a survey, Zoho Sheet can do it all for you. Forms is an excellent feature that helps you collect information in the simplest of ways and having it in Zoho Sheet takes it a notch higher. Build Simple yet Powerful forms Building forms using Zoho Sheet is fairly simple. The exclusive 'Form' tab lets you create one quickly. Whether you
    • Meet the latest feature of Zoho Sheet: Lock Cells

      We are happy to announce the release of one of the most awaited features in Zoho Sheet. ​You can now lock the cells that you wish to keep ​secure. Once you are done with editing cells, you can lock them so that they won't be modified anymore. We believe that this feature will be a great addition to our existing set of collaboration features and is intended to improve your collaboration experience. You can access this new feature Lock from Data tab. Apart from being able to lock individual cell ranges,
    • Feature enhancement: Highlight rows based on a cell value

      Hello Sheet users, We're excited to announce a new feature enhacement, shaped directly by your valuable feedback! As you might know, conditional formatting is a great tool for anyone dealing with large data sets. Previously, if you’ve ever wanted to draw
    • Revamped Print in Zoho Sheet—customized for paper

      The latest enhancements to Zoho Sheet's Print settings allows you to print a worksheet or a selected range, with customizations that make the data comprehensible, even on paper.   Customize header and footer Make your spreadsheets meaningful with a relevant header and footer. You can now choose to display the file name, sheet name, current page number, total pages, date, and time as the header and footer in your print view. Besides the predefined elements, you can also give a custom text for header/footer.
    • Slicers are now available in Zoho Sheet—filter your data interactively

      At Zoho Sheet, we diligently track user requests and feedback. In line with this, based on extensive user requests, we've integrated Slicers to pivot tables and are delighted to announce its release. Slicers are interactive visual filters that have add,