You pasted the function, the words appeared, you saved the file - and the next morning every amount in words is a NAME error. The most common reason is embarrassingly simple: the file was saved in the wrong format, and Excel removed the code while saving.
It happens right after success, which is why it confuses everyone: the function worked, the words were correct, and then a routine Save quietly destroyed it. Here is why the file format decides whether your function lives or dies, and the better home for it if you use it every day.
The warning is real Excel wording - it appears when a file that contains VBA code is saved as .xlsx.
The normal Excel format, .xlsx, was designed to be macro-free on purpose - that is its safety promise. It physically has no place to store VBA code. So when a workbook contains your SpellNumber function and you save it as .xlsx, Excel shows the warning above and, if you click Yes, saves the sheets without the code.
Nothing looks broken at first. The words already calculated stay on screen. But change any amount, or reopen the file tomorrow, and every word cell turns into a NAME error - because the function itself is gone. The data survived; the machine that produced it did not.
The file icon gains a small exclamation-style badge and the name ends in .xlsm - that is how you and anyone receiving it can tell it carries code.
When you open an .xlsm file, Excel shows a yellow bar: SECURITY WARNING Macros have been disabled, with an Enable Content button. Until you click it, the words will not calculate.
For a file you built yourself, or the template your own office uses, clicking Enable Content is the normal, expected step. But learn the habit the right way round: the bar is a question, not a decoration. If an .xlsm arrives from a stranger by email, that same bar is the only thing standing between you and whatever its code does. Your own file - enable. Unknown file - do not.
If you type amounts in words in many different files, saving code inside every workbook is the wrong shape. Put the function in an add-in instead - that is the route the video takes.
From then on =SpellNumber works in every workbook on that PC, and your invoice files can stay plain, safe .xlsx. One copy of the code, maintained in one place.
See the file downloaded, the add-in switched on and the formula typed live - the complete method in about a minute.
Watch Full VideoFrom that saved copy, yes - the code is not hidden, it was removed during the save. If you still have an earlier .xlsm copy or the add-in file, reopen that. Otherwise paste the code again from the main guide; it takes two minutes. Your numbers and the already-typed words were never touched.
It opens, and they will see a yellow security bar. The word cells calculate only after they click Enable Content, because the code travels inside the file. If your office sends invoices out, the add-in route is cleaner for you - but the customer never needs the function, only the finished words, so print or send a PDF of the final invoice.
No. The format is a normal, official Excel format used by lakhs of offices. The risk lives in files from unknown sources, because macro code runs with your permissions. Treat an unknown xlsm like an unknown program: do not enable its content.